SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 66 of 66
  1. #51
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  2. #52
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where should I start in order to design GUI-based applications?

  3. #53
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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:
    Code:
    require 'tk'
    TkLabel.new { text 'GUI Application' }
    Tk.mainloop
    Just search google for "windows #{language}"

  4. #54
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2
    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:
    Code:
    require 'tk'
    TkLabel.new { text 'GUI Application' }
    Tk.mainloop
    Just search google for "windows #{language}"
    Not to be rude or anything, but seriously... SHUT THE **** UP.

    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.

  5. #55
    SitePoint Evangelist chiphunt1's Avatar
    Join Date
    Oct 2003
    Location
    louisville, ky
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  6. #56
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    Are you a Ruby spokesperson or something? Honestly, it's as if that was the only language you've ever heard of.
    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#.

  7. #57
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  8. #58
    SitePoint Zealot bronze trophy
    Join Date
    Jun 2004
    Location
    Stockholm, Sweden
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  9. #59
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Fenrir2
    So if you don't plan on writing these, choose a high-level-language. I'm sure that if you write a C/C++ program you could do it twice as fast in Ruby.

    Please compare:

    C++ (is the syntax correct?, compare this to the readable Ruby code)
    for(int i = 0; i < 5; i++)
    {
    print "hi";
    }

    Ruby (even my mum could understand this):
    5.times { print "hi" }

    This thing will run 0.01 sec faster in C++. Who cares?
    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.

    (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

  10. #60
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,179
    Mentioned
    234 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Fenrir2
    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:
    Code:
    require 'tk'
    TkLabel.new { text 'GUI Application' }
    Tk.mainloop
    Just search google for "windows #{language}"
    Sorry, I just read this post and, first of all, I want to let you know that I never used Ruby.

    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.

  11. #61
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by champ
    Thanks for the advice. One follow-up question. If I do decide to learn C, should I start with regular C then move to C++, or just skip regular C and start with C++?

    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)

  12. #62
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona
    Sorry, I just read this post and, first of all, I want to let you know that I never used Ruby.

    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.
    Reducing programming time is almost always more important. Computer power is cheaper than developers.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  13. #63
    SitePoint Zealot yukimushu's Avatar
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I started off learning C++, and found the transition to PHP very easy. Alot of the syntax is very similar.

  14. #64
    I Never Give Up roosevelt's Avatar
    Join Date
    May 2005
    Posts
    515
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  15. #65
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,179
    Mentioned
    234 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Travis
    Reducing programming time is almost always more important. Computer power is cheaper than developers.
    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.

  16. #66
    Non-Member Musicbox's Avatar
    Join Date
    Nov 2004
    Location
    india
    Posts
    1,331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •