Jump to content

which language is the best match for my envisioned project

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
13 replies to this topic

#1
Codix

Codix

    Newbie

  • Members
  • Pip
  • 5 posts
Hello,

I want to pick up programming again because i have a program in mind that i really would like to create. The problem is that i don't know which language is best for the program i want to make. I will give a description of the program first.

It will be a program designed to communicate with a broker website. It will have to be able to receive and calculate with realtime streaming data on stocks coming from the stockmarket. It will also have to be able to send commands to the server of the broker website. Commands like buying or selling a share for example.

Now i've noticed that most apps on the website are java applets so common sense says 'go learn java'. But the book i have about java is only a small book of merely a 300 pages. I have however a much larger and more elaborate book on C/C++ lieing on the shelf. So thats why i prefer to learn C++ but i don't know if the developmental possibilities with java are greater then with C++ or not. I also need to say that i don't have any experience with either languages. I have made a few programs with Visual basic 6.0 in the past and thats it.

So what do you recommend? C++ or Java?

Thanks in advance

-Codix

#2
Aereshaa

Aereshaa

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 790 posts
C++ is better in pretty much every way: Less boilerplate, simpler, faster, less memory usage, more libraries. The only use of Java that I respect is applets. For a desktop application, use C++ or C.
Watches: Nanoha, Haruhi, AzuDai. Listens to: E-Type, Dj Melodie, Nightcore.
"When people are wrong they need to be corrected. And then when they can't accept it, an argument ensues." - MeTh0Dz

#3
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts

Codix said:

So thats why i prefer to learn C++ but i don't know if the developmental possibilities with java are greater then with C++ or not.

No, on the contrary, C++ can do a lot more than Java. It is a very powerful, but also complex language, and quite darn harder to learn than Java. The application you are describing also sounds like something Java could do well, so there is no obvious choice here. If you plan on staying with programming and do powerful things I would go and learn C++. That will probably take you quite a while. If you just want to make this single program as fast as possible I would rather look into a language like Python, actually.

And as long as you have internet connection there is no need to worry about how large books you have, as there is plenty of documentation and free tutorials online. Bruce Eckel has written some books on both C++ and Java ("Thinking in C++" "Thinking in Java") that are freely available online as ebooks in pdf format. They are updated and quite popular.
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#4
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
I had originally written a detailed response for this post, but due to a climbing accident lost it all. Anyway, I will actually advise you to do the exact opposite everyone above me has said and suggest you do NOT learn C++ yet. In fact, as a first language, it's absolutely one of the worst you can choose, and I realize you have a bit of VB experience, but I meant what I said.

My suggestion is to learn to program with Java. If you're really committed to this code idea of yours, then the extra $50 to get a really good Java book (pretty much ANYTHING other than Thinking in Java) or the work to find the information online will not be a great deterrent for you. The responses above me are correct, C++ is more than capable of doing what you're trying to accomplish, but Java doesn't require thinking so much about the implementation details, is truly Object-Oriented, and has all of the GUI, networking, and graphics libraries you need built into the standard, so there is literally no other decisions you need to make other than choosing to use Java. C++ mandates that you think about the details of memory management, character arrays, and object micromanagement, whereas in Java you can "fire and forget" objects and the Garbage Collector will clean up after you. I also adamantly disagree with marwex89's spurious assertion that Java is less capable than C++, both languages are equally capable of performing any programming task that can be ascribed to a computer, up to and including programming operating systems. That's what Turing Completeness means.

Given this information, my suggestion to you is to learn Java instead, and that is my honest recommendation. This does not preclude you from eventually learning C++, however I believe that you will be highly disappointed with the results of C++ at the onset, and may even be turned off to programming in general if you start out with it. If not, you'll grow to hate the language rather than appreciate it for the extra power it gives you. I've talked to a lot of people and those who learned a different language before C++ have always been better off and learned to appreciate the power C++ has to offer. If you are frightened off by Java's alleged slower running speed, increased memory demands, or vendor lock-in, then perhaps you can go with C instead, though I think the bridge from Java to C++ is far more comfortable, since I am not a fan of "C with Classes" style programming. All of this, however, isn't here nor there, and my suggestion still stands. Learn Java first, not C++.

I think if you downloaded a copy of Eclipse or NetBeans, which should either way drag the Java Development Kit with it, you can get started there. Both IDE's are fairly comfortable, and while I have little to no experience with Eclipse, I know NetBeans comes with a GUI builder you can take advantage of. Some people here may disagree with me, thinking that you should be forced to learn it the hard way before taking advantage of the easy way, but in my opinion that simply makes it so people entirely lose their interest in programming altogether. You can be taught to program properly if you're still interested, but if you're not then we've done nothing but lose a potential programmer. However, if you'd like to learn "the right way", then may I suggest you download no IDE at all and instead simply get the JDK, find a suitable text editor (depends on your OS), and program using that. Then, you can compile and run using the command line, which grows hair on your chest so you'll be a real man.

I think I covered most of it, I'm not sure if there's something I missed, and if there is or you've got any other questions I'll be more than glad to answer them. And before you ask, no, I don't dislike C++ in any way, I love programming with that language and use it frequently. In fact, if anything, Java is a bit more alien to me, but my recommendation is still Java. There are so many nuances to C++ and the language is so skewed to being expert-friendly that to get the most out of the language would take 10 years or more using it. This is a commitment I have accepted and still spend working on, Java is less of one. Try Java, and if it's not your cup of tea, I think you would have been worse with C++.
Wow I changed my sig!

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Let's abort the language discussion for a moment and deal with the problem:
1) you are talking about communicating with a server. This means TCP/IP connections at a minimum.
2) the applets may contain vital data in a proprietary interface: this suggests you will need to sniff the communications stream and figure out how to duplicate the portions that are relevant to what you're doing.
3) you haven't told us which site this will be (probably because we foiled an attempt on your part to spamvertise your site, but this could legitimately be the upteenth one of these we've seen this year). Depending on the interface, you may do better with a tool like AutoIt.

Short answer: you haven't reached the stage yet where you can even think about picking a language. You still have to spend time figuring out what you're trying to do.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts

ZekeDragon said:

(pretty much ANYTHING other than Thinking in Java)

You really loathe that book, don't you :) Despite your feelings it is still a popular book for Java newbies and should not be ignored.

ZekeDragon said:

I also adamantly disagree with marwex89's spurious assertion that Java is less capable than C++, both languages are equally capable of performing any programming task that can be ascribed to a computer, up to and including programming operating systems. That's what Turing Completeness means.

Ok, then, I was't completely honest. That being said, it is not possible to program an entire operative system purely in Java as it requires a VM, and I would never go as far as saying that they are "equally capable of performing any programming task that can be ascribed to a computer". Java is at the end of the day not a low level programming language, and was never intended to be.

No doubt, Java is popular, and might be a good choice for a first programming language. I can't say I like it very much, but lots of people do. It requires less effort than C++ and can accomplish great things.
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#7
Codix

Codix

    Newbie

  • Members
  • Pip
  • 5 posts
Thanks for all the replies!

I guess the smartest thing to do is indeed to learn java first given my general experience with programming. But after java i would like to start learning C++ as well because i might want to create other programs in a more distant future and perhaps C++ will be the better choice for those.

So, about Java. I have heard that there are multiple versions of Java available. There is Java Swing and J2EE for example. Is there a significant difference in terms of possibilities between the two?

Regards,

Maurice

#8
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Read this and be enlightened:
Java (software platform) - Wikipedia, the free encyclopedia
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#9
Codix

Codix

    Newbie

  • Members
  • Pip
  • 5 posts

WingedPanther said:

Let's abort the language discussion for a moment and deal with the problem:
1) you are talking about communicating with a server. This means TCP/IP connections at a minimum.
2) the applets may contain vital data in a proprietary interface: this suggests you will need to sniff the communications stream and figure out how to duplicate the portions that are relevant to what you're doing.
3) you haven't told us which site this will be (probably because we foiled an attempt on your part to spamvertise your site, but this could legitimately be the upteenth one of these we've seen this year). Depending on the interface, you may do better with a tool like AutoIt.

Short answer: you haven't reached the stage yet where you can even think about picking a language. You still have to spend time figuring out what you're trying to do.

Its a broker website similar to e-trade. The program will have to be able to track the high's and low's in the exchange rate of a given share and it needs to be able to send commands to the server that make it buy or sell a share... thats it.

#10
Codix

Codix

    Newbie

  • Members
  • Pip
  • 5 posts
[quote name='marwex89']Read this and be enlightened:
QUOTE]

Thanks for the link, its content made me remember that with java one can make allot of neat things for the cellphone as well. :)

#11
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
You can (and with C++ too, just to have that said!) :D
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

#12
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Unfortunately, that's a very high-level description of something that will need a LOT of details filled in to reach an implementation. You have to:
1) request exchange rate information. What format is this received in? Is there an API offered by the company to help you build this tool? Is this information presented to your browser as raw HTML, XML, other?
2) send requests to buy/sell. Again, is there an API? How are requests made through the browser?

If all of this is handled through web pages, you may want to create a FireFox plugin to manage all of this, or code your solution using the Selenium plugin. If the data is handled extensively by Flash, the challenge is completely different.

The problem is you've stated what you want to accomplish, but stated nothing about what is necessary to accomplish it. Picking a language now could make the process harder if it's not well-suited to the details of your problem.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog