Thread: How can I learn?

  1. #16
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,656
    Too much C++ bashing going on;IMHO ........so presenting some defense :
    >"f you talk to the C++ crowd they will tell you that C++ is C on steroids."
    NO, C++ is a different language, with some similarities to C.

    > "to fully deploy C++ code you have to *think differently* than you do with C"
    Er.. that is the point of it being a different language....If it does not have a new way to think about problems, it isn't worth learning.

    > "C++ strings require conversion before use with OS APIs" :
    That would complicate everything..because character arrays and streams are an universal interface...and would be understood by everything. And the conversion is trivial... The input is automatic(by a constructor, and output is by *.c_str() .

    > " . I've tried I don't know how many times to get my head around it and just plain can't. Object Oriented Programming bears little or no reseblence to how my head works and it just won't sink in. "

    Maybe, the problem is that you're trying too hard ? ...it isn't really radically different.
    I find most (if not all I've seen) C++ programs having their outlines as procedural. Classes and objects play a role within that...making the process more modular.

    > "Of course your experience might be different but I would never recommend C++ to a new programmer. "
    Mine was.... I found/find the C++ standard library easier to learn/use.(Except possibly ... formatted I/O!)
    The remaining/basic concepts are same...as long you're careful, the knowledge of one, for the most part, carries on to the other.

    > "....and be as compatible with the underlying OS API as possible (able to directly import headers and libraries)... But as far as I can tell from extensive searching, such a laguage does not yet exist."
    I think... such an OS API does not exist because of inconsistent design. Though not an OS API, if you have looked at OpenGL, it fits what I think an API should behave like.

    >"I've always held that a programming *language* should be as simple as possible (that is, use a minimum number of keywords to guarantee general applicability) be as safe as possible (runtime error checks, exception handline, etc) "
    "The next attempt to solve the problems was "managed code" (.NET and JAVA) returning to the bad old days of interpreters and runtime modules in the hope of improving the quality of code. All they really did was to make things yet again more complex for the programmer."

    Agreed

    Lets see if the rest of the C++ crowd has anything to say.

    (@Those-Who-Must-Not-Be-Named : Sorry for 'derailing' the thread... feel free to split !)
    Last edited by manasij7479; 11-11-2011 at 06:27 AM.

  2. #17
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by manasij7479 View Post
    Too much C++ bashing going on;IMHO ........so presenting some defense :
    Y'know what? I don't disagree with you.

    It's just been my experience that C++ libraries are far more complex than they need to be and I find it painfully confusing. I've written c-like code in C++ using classes as a support mechanism and it works fine. (Do a little searching, you will find some of it --and the accompanying struggle-- in the C++ forum on this board.)

    If you download the Windows SDK (Windows API documentation) you will discover that it is VERY complete and since it's native OS it's fully compatible. C can and does import all of it. C++ went a different route, mostly to 3rd party widgets that are generally wrappers for Windows API calls and concepts... This is not entirely a bad thing but by and large it impressed me as being "mostly unnecessary".

    If I could find the right IDE -- one with a full suite of resource editors and no stupid bloatware-- I might be inclined to try C++ again.

    Sadly I think programming languages have largely gone the same way as Windows has: "Throw everything you can at the user and hope it sticks"... meanwhile most of us yearn for a "Lean and Mean" version that does the basics and leaves the rest up to us.

  3. #18
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,656
    Quote Originally Posted by CommonTater View Post
    At one point I "extracted" the base Pascal out from under Delphi, redid the RTL (Run Time Library) to remove dependence on Objects, rewrote a few functions for better perfomance and worked with that for most of 4 years. It worked just fine except for a number of missing Windows imports that I never could get working.
    Instead of always badmouthing Open Source, you should try to look at the benefits too.
    If you could look at what exactly was wrong in this case, you could have succeeded.

  4. #19
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by manasij7479 View Post
    Instead of always badmouthing Open Source, you should try to look at the benefits too.
    If you could look at what exactly was wrong in this case, you could have succeeded.
    Oh believe me, I've given it a pretty fair trial over the years, even participated in a few projects.

    Given some of the bickering and fence building I've seen, I remain convinced that a tight group, or a single person, will almost always do a better job than having people who's primary credential is ownership of a computer messing about in the code.

    Have you ever considered how strong and how well standardized Linux could be if it was developed by a core group of specialist coders? Really... you want a dog's breakfast, try making sense of all the Distros and branches of that OS... waddafreakingmess!

    By way of contrast... Look at Pelles C... the whole thing was done by one person (Pelle Orinius) and the result is magnificent. It's consistent, complete, easy to use, standards conforming and extremely well documented. Can't say that about most open source work.
    Last edited by CommonTater; 11-11-2011 at 07:03 AM.

  5. #20
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,656
    You seem to have some misunderstanding about what Open Source really is.
    Open source does not mean everyone gets to ........ on the code.(Sure they can do so for their own amusement... but the official repository will be okay).
    Even a small patch from a new guy will be heavily scrutinized dozens of people before being being applied in most significant projects, and if you are the owner of a project, you can just keep tight control.

    Linux (I mean the kernel..) is/was/will always be written a (quite massive)core group pf hackers, most working in significant posts of other companies.

  6. #21
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by manasij7479 View Post
    You seem to have some misunderstanding about what Open Source really is.

    Trust me, I understand it just fine.
    You're wasting your time trying to sell me on it... All I have to do is look at the amount of crap code out there to know what the problem is.

  7. #22
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by CommonTater View Post
    Have you ever considered how strong and how well standardized Linux could be if it was developed by a core group of specialist coders?
    If by that you mean, have a core group of specialist coders develop and package the entire OS, that would well and truly suck. I think the linux world is much stronger for its diversity. That does place certain extra responsibilities on the user, but I also consider that a good thing, because god save us from drooling hordes of idiots -- they should turn back at the door, thanks. I'm an elitist that way.

    Conversely, I have to use "centrally managed for the masses" windows and OSX occasionally, and IMO they are absolute lowest common denominator crap -- totally inflexible with a ridiculous interface that is the product of marketers, not programmers. OSX is particularly goofy. Windows is just obtuse and awkward.

    Anyway, linux proper (the kernel) is developed by a core group of specialized coders. Go tell them, "Oh I heard this is open source so I am free to get involved, be a goof, and screw things up." I am sure they will be enthralled.

    Really... you want a dog's breakfast, try making sense of all the Distros and branches of that OS... waddafreakingmess!
    Because you don't get it, and no one is really trying to sell it to you. I agree it is probably very shocking coming from the sterile, monotonic world of windows.

    Keep in mind that altho some people have made a business out of linux, linux is not in any way shape or form a business, and this is reflected in the nature of "the product". Very positively, IMO, but the contrast is stark. If all you like to eat is stuff you can buy at the corner store in a foil package, putting a fresh vegetable in your hand might well gross you out.

    By way of contrast... Look at Pelles C... the whole thing was done by one person (Pelle Orinius) and the result is magnificent. It's consistent, complete, easy to use, standards conforming and extremely well documented. Can't say that about most open source work.
    I can say it about most of the open source work I depend upon. Look at the mozilla project compared to the cluster___ know as "Internet Explorer", etc. I can't really say anything for the documentation of either of them, but certainly Mozilla firefox is significantly more standards compliant and generally less defective.

    And GCC is hands down the most popular C compiler in the world, for better or worse. Similarly, the internet runs mostly on apache, an open source project.
    Last edited by MK27; 11-11-2011 at 07:58 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #23
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Well... it would seem we disagree *again*.

  9. #24
    spaghetticode
    Guest
    Guess I chose the wrong keyword here... I would have loved a little more input concerning my "dilemma", instead I caused a (very interesting though) huge discussion on free software.

  10. #25
    Princess of code universe programmer1's Avatar
    Join Date
    Nov 2011
    Location
    Wonderland
    Posts
    38
    Firstly I wanna thank you all because of your help and giving me a chance to learn your opinions about programming languages. It is obvious that I have a lot to do. I read all comments and I got C,C++,Java,Pascal are good choices to study. And I see that open source will be "next item" for me. But if I will be a good programmer, I have to use them to improve my skills. Am I right? (I hope so)

    For C or the others I have to study hard.


    Thanks again.

  11. #26
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by dennis.cpp View Post
    Guess I chose the wrong keyword here... I would have loved a little more input concerning my "dilemma", instead I caused a (very interesting though) huge discussion on free software.
    That happens. I think it's okay (within reason*), since it is not like you have to sit thru a lecture or conversation -- you can just skip posts.

    * but who's, lol

    If this is your dilemma:

    Quote Originally Posted by dennis.cpp View Post
    I started several times trying to learn C++, but I don't get the feeling I am moving on in any way. I never had that feeling with C, where I definitely saw progress. Parts of me really *want* to learn C++, but then other voices inside my head always tell me that I'd be better off sticking with C and working my way through GTK+.
    Here's $0.02: I learned C before C++, and I still use C much more. If I had learned C++ first, I imagine I would not use C much, but who knows?

    The reason I don't use C++ much is because:

    1) it consumes much more resources (there's an example below in the bit about gtk)
    2) compared to the other formal OO languages I use, which are dynamically typed interpreted languages (and therefore, lower performance) C++ is much more awkward. The syntax is long-winded, and I find some of the idiosyncrasies (such as iostream) silly; they are often IMO not any form of improvement over the C equivalent. Of course, you have the freedom to choose, but I do think it is better, when in Rome, to do as the Romans do, if you want to make sure everything is going to work out, etc.

    I believe the major significance of C++ is that it makes a bit of a compromise, resource usage wise, in order to provide a more foolproof high performance setting. That is probably a great advantage for large scale projects involving lots of developers. Unfortunately, I don't do that kind of work, so many of the features to me seem obtuse.

    However, it is still interesting and worth learning. I'd be happy to work with it more given the chance, but I don't have much motive to do so on my own. More than once I've had some little thing I wanted to do and thought, hmm, I'll use C++ this time. However, it really doesn't save me much time, and when I see the difference in terms of memory use, I just cannot stomach it and end up starting again in C.

    I've though a lot about using C++ just for the OO -- ie, ditching the STL, which is the major memory pig, except that this then comes down to the difference between:

    Code:
    myobject.mymethod(somearg);  // C++
    mymethod(myobject, somearg);  // vanilla C
    No difference at all, considering that I really don't care about public vs. private, etc, because of the nature of what I am doing. I don't have to write for a team (or not much of one) or the general programming public, so it doesn't matter to me how "safe and friendly" my API is.

    WRT GTK+, I learned that before I learned C++. So when I learned C++, I started using gtkmm, the C++ wrapper library for gtk. Doing exactly the same thing in gtkmm vs. gtk+ will use 300-500% of the memory, because all those handy wrapper classes make heavy use of the STL and templating. And to be honest, I didn't find them that handy -- they were more like someone else's idea of how to organize on a higher level, and while I'm all for "organizing on a higher level", I just didn't like how it was done.

    I find that true for many formal OO API's I have to work with (generally, in perl); I'd much prefer they were more minimal, and allow me to class them up in a more custom way. OTOH, having something generic ready out of the box is less work and usually makes things simpler. But I always feel I'm am going along with someone else's plan and grind my teeth when it is not the plan I would have liked.

    Currently, my preference for GTK stuff is C++, but using my own classes built from the C gtk+ API. Gtk+ uses its own types (gstrings, etc) anyway. So if you are into C++ and gtk+, they can go well together -- just stay away from gtkmm, IMO.
    Last edited by MK27; 11-11-2011 at 01:45 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  12. #27
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by programmer1 View Post
    I read all comments and I got C,C++,Java,Pascal are good choices to study.
    Read again... Pascal is deader than a doornail. Killed by Borland when they introduced Delphi.

    And I see that open source will be "next item" for me.
    Open source is as means of coordinating software creation amongst several programmers. I generally advise that it's not the place for beginners to be playing about. A lot of really bad code happens when beginners get into some of these projects. In effect that's what killed the D programming language... everybody trying to get their favorite subroutines into the library, making a horrific mess out of it.


    Work on C, until you are proficient enough to write medium sized applications (like a media player or basic video game) on your own. There's enough challenge there to keep you busy for the next year or so, before you even consider moving to other languages or teamwork projects.

  13. #28
    Princess of code universe programmer1's Avatar
    Join Date
    Nov 2011
    Location
    Wonderland
    Posts
    38
    Quote Originally Posted by CommonTater View Post



    Open source is as means of coordinating software creation amongst several programmers. I generally advise that it's not the place for beginners to be playing about. A lot of really bad code happens when beginners get into some of these projects. In effect that's what killed the D programming language... everybody trying to get their favorite subroutines into the library, making a horrific mess out of it.


    Work on C, until you are proficient enough to write medium sized applications (like a media player or basic video game) on your own. There's enough challenge there to keep you busy for the next year or so, before you even consider moving to other languages or teamwork projects.

    Nooooooo, when I said "next item", I mean after c and maybe after java So it means (at least) one year later

  14. #29
    Registered User
    Join Date
    Aug 2008
    Location
    Belgrade, Serbia
    Posts
    163
    I am seriously considering you a troll.
    Vanity of vanities, saith the Preacher, vanity of vanities; all is vanity.
    What profit hath a man of all his labour which he taketh under the sun?
    All the rivers run into the sea; yet the sea is not full; unto the place from whence the rivers come, thither they return again.
    For in much wisdom is much grief: and he that increaseth knowledge increaseth sorrow.

  15. #30
    Registered User
    Join Date
    May 2010
    Posts
    4,446
    Quote Originally Posted by CommonTater View Post
    If you download the Windows SDK (Windows API documentation) you will discover that it is VERY complete and since it's native OS it's fully compatible. C can and does import all of it.
    Actually C does not "import" any of the Windows API, the Windows API was originally written in C (with some assembly thrown in) so the API is in C.

    Quote Originally Posted by CommonTater View Post
    C++ went a different route, mostly to 3rd party widgets that are generally wrappers for Windows API calls and concepts... This is not entirely a bad thing but by and large it impressed me as being "mostly unnecessary".
    I agree, if you are already comfortable with the Windows API, the wrappers are unnecessary. I wouldn't be surprised if you have not already written some "C wrappers" for some of the common Windows API functions to make it easier for yourself. But you can use the Windows API in C++, without the wrappers, without any major problems.

    Quote Originally Posted by CommonTater View Post
    If I could find the right IDE -- one with a full suite of resource editors and no stupid bloatware-- I might be inclined to try C++ again.
    Why? You seem to be quite comfortable with C and C seems to do most everything you want, why change? If something works why "fix" it?

    To me there is a big difference between using C correctly and using C++ correctly. The biggest difference between C and C++, in my opinion, is the different mindset, procedural versus object orientation, and the differences in these mindsets can be mind boggling. I also think that OOP is often overused, making large, cumbersome, hard to maintain programs. But, when properly used, it can create small, easy to use, easy to maintain programs. The same can be said about procedural programs.

    Quote Originally Posted by CommonTater View Post
    Sadly I think programming languages have largely gone the same way as Windows has: "Throw everything you can at the user and hope it sticks"... meanwhile most of us yearn for a "Lean and Mean" version that does the basics and leaves the rest up to us.
    I agree.

    Jim

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Where did you learn it?
    By swgh in forum Game Programming
    Replies: 13
    Last Post: 05-12-2006, 03:55 AM
  2. Do I have to learn C, to...
    By eu.stefan in forum C++ Programming
    Replies: 10
    Last Post: 04-04-2006, 01:37 AM
  3. You have to learn C in order to learn C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 07-16-2004, 10:33 AM
  4. Were to learn.
    By Black&White in forum C++ Programming
    Replies: 9
    Last Post: 05-19-2004, 04:05 PM
  5. how well do you learn?
    By iain in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-21-2002, 11:49 AM