I learnt PHP then C. Apart from a few memory issues I didn't have any problems. Knowing how to program is more than important than how to do something specific in a particular language.
| SitePoint Sponsor |





I learnt PHP then C. Apart from a few memory issues I didn't have any problems. Knowing how to program is more than important than how to do something specific in a particular language.
I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky
Where should I start in order to design GUI-based applications?




Well, certainly not with C/C++.
You'll need 100 lines to do a basic window. In C# that's only 6 or so, 15 in Java and in Ruby 3 lines. Java and Ruby have the advantage of being cross-platform.
In Ruby:
Just search google for "windows #{language}"Code:require 'tk' TkLabel.new { text 'GUI Application' } Tk.mainloop
Not to be rude or anything, but seriously... SHUT THE **** UP.Originally Posted by Fenrir2
I want to learn C++. You're like the annoying sales person in Best Buy telling me to buy a computer that I don't want, when I have something specific in mind. You can't persuade me otherwise. I don't care about the length or difficulty of the code, I care about the way the program runs once it's finished. Furthermore, speed is one of my major concerns once it's compiled, and C++ is the language I intend to use for that purpose.
Now, please stop trying to change my mind. Are you a Ruby spokesperson or something? Honestly, it's as if that was the only language you've ever heard of.
I feel so rude with these posts, and I don't think it's the way to address it, but I'm fairly annoyed. If this is too harsh, please tell me.



Well, it's slightly harsh. Anyway, I took 4 years of CS classes that were all in C++. I don't think Fenrir2 is seriously off base when he suggested C#. As a matter of fact, I think the .NET languages are pretty good. Especially if you're looking to build a GUI application. I think what the former post was saying that you can program in C++ with more code, but it's not going to be more efficient or noticeably faster than C#. Anyway, you have made it clear that C++ is the way to go. I personally would buy this book:
http://computerscience.jbpub.com/catalog/0763704814/
It focuses on abstract data types, OOP methodologies, and software engineering. I think this is the direction you need to go. The book is basically the equivalent of a Junior level C++ programming course. Then you can move on to advanced data structures, which would be like a senior level class. If you master C++ data structures, you can do whatever you please. I haven't looked into qt deeply, but it's a c++ gui:
http://www.trolltech.com/products/qt/index.html




Sorry, didn't see you were the one in need of speed.
Here:
http://www.relisoft.com/Win32/
It's a tutorial for Win32 api in C++, looks like a good one.
No, not at all. I've tried C, Java, PHP, C#, but I like Ruby so much because it is efficient. And I just don't understand why people write 100 lines of code when the same thing can be done in 3 lines. The tradeoff is speed, but 99.9% of all applications can be done in Ruby without becoming too slow. But Photoshop, for example, is in the other 0.1%. So when you need speed, go for C/C++/Assembly. You could also do the expensive loops in C, and the GUI code in C#.Are you a Ruby spokesperson or something? Honestly, it's as if that was the only language you've ever heard of.
Okay. Now that you're not trying to persuade me to try another language, I'd like to say thanks. Anyways, I think I'll take a look at those suggested books. I've been meaning to get around to learning one of the C's for a while now, but I just haven't gotten around to it, because all of the tutorials I've seen are too basic, and I usually quickly get distracted. As long as I find something that's relatively challenging, and my mind is set on finishing it, it'll keep my attention all day and night long. I hope this helps me find a good place to begin learning. Thanks for everyone's help, except for Fenrir2 trying to persuade me otherwise
I apoligize for being so rude, but I don't like it when people try to change my mind from something I'm set on. Sorry.
http://winprog.org/tutorial/ <- This is a very good introduction to Win32 API programming.
If there is a way to overcome the suffering, there is no need to worry; if there is no way to overcome the suffering, there is no point to worry.
- Shantideva





Actually, you'd be surprised. As part of my PhD I taught myself C++ and I translated some code from S (so another low-level language, bit like Matlab) into C++, and when you're doing seriously intensive iterative processes (nothing like the example you have above) then the difference was beyond noticeable. I went from running 8 iterations in 16 hours to over 10,000 iterations in under a minute. I translated the code to Fortran as well and it wasn't as efficient. So yeh, some people care.Originally Posted by Fenrir2
(actually, see here: http://www.sitepoint.com/forums/showthread.php?t=165976 for a similar discussion).
To whoever asked about learning C++, I've got a few books here, but TBH I found trial and error and the cplusplus forums to be about the best way. I like the Bloodshed C++ compiler which is free and easy to get going with. Good luck getting to grips with memory allocation and pointers.![]()
I swear to drunk I'm not God.
» Matt's debating is not a crime «
Hint: Don't buy a stupid dwarf ö Clicky

Sorry, I just read this post and, first of all, I want to let you know that I never used Ruby.Originally Posted by Fenrir2
I think that when you are talking about efficiency, you are only taking into consideration only the time that the programmer needs to write a particular routine or function (like creating a GUI Application). I think that the goal, when you build a complex application, is not to save you time in your programming (a nice thing, though) but to take maximum advantage of the resources in the computer so that it runs faster. Sometimes it means that you have to write more code to that effect. So, not only is important to think about the amount of code you need to write, but how the memory is handled as well.
I am assuming, since you say that Ruby is crossplatform with Java, that Ruby does have good memory handling methods and that it is efficient there, too. But it does make me think that, most of the GUI application (specially for windows) have libraries programmed with c/c++ and a visual interface created with visual basic or something similar (not very efficient language but easy to work with for visual interfaces)
On the other hand, since all OS are programmed with c/c++, I think that knowing those languages is useful.
But, hey, this is only my reflexion. It has been at least 10 years since I read anything about c/c++, so I may be completely wrong.
Originally Posted by champ
I started learning c++. I have the M$ bundle with the Cd's and the book thats like 5000+ pages. (no way to properly learn it in two months!). Now in that book it tells you straight away. If you do not know c don't learn it now. Go straight to c++. Cause the diff in code is minute BUT it will be a hindrance to learning c++ as you will find yourself reverting back to c rules. So if dabbling in c Lang at all go C++. And as far as I recall, c++ still has the best mem management and while takes mroe to program is fastest lang for the machine to run (side what-bindary LOL). As for C# well that has some major pitfalls. And isn't quite being widely accepted yet (not sure of details on it). And as its been said if your goal is php go for that right off the bat. Im trying to learn both. LOL.
Now these are all programer freindly lang. I started in the cassette days dabbling with code. Typing 10010101 101010 1010101011110101011 for pages and pages, one line wrong-boom! Down goes the proggy. And several times after pages of work my friends sister would trip over the cord and kill the power. All lost since the tape wasnt on yet! ugh! Wow so glad for these easier methods. But remember it all goes back to 1's and 0's in the end. The less steps it takes for us to program usually means the more interpiting the machine must do which slows the programs speed down in the end. (thats how I understand it anyways)




Reducing programming time is almost always more important. Computer power is cheaper than developers.Originally Posted by molona

I started off learning C++, and found the transition to PHP very easy. Alot of the syntax is very similar.
I wonder why people are taking it to a whole new topic. PHP was created based on C/C++, which is why the functions, loops, some codings are similar but they are entirely different.
If you want to learn PHP, to make scripts for your website you can learn PHP without any kind of background experience of other languages such as perl, or asp. Don't worry about C++, it's just some people say to make things complicated for other people.
EASY ANSWER, NO YOU DON'T NEED TO LEARN C++ TO LEARN PHP.![]()
Last edited by roosevelt; Sep 25, 2005 at 10:19.

I agree with you. I just simply meant that, on occasion, 10 more lines of code could bring a better use of resources and that is more important than saving time to write those lines. But, of course, we all try to write as little as possible. It saves you time and there is less compiling to do.Originally Posted by Travis
if you are only webmaster then learn php first and again if you are webdeveloper then learn c++ and php as well.
Its that easy!
Bookmarks