Another: "Should I learn a certain language as a beginner" thread.

This is a discussion on Another: "Should I learn a certain language as a beginner" thread. within the General Discussions forums, part of the Community Boards category; I have seen so many threads, almost just like this one, in a myriad of forums... So if you feel ...

  1. #1
    One Level Below Beginner
    Join Date
    Jul 2009
    Location
    Corner of Nowhere and Yonder
    Posts
    19

    Another: "Should I learn a certain language as a beginner" thread.

    I have seen so many threads, almost just like this one, in a myriad of forums...
    So if you feel my question is trivial, or inflicts your gag response, I apologize.

    When it concerns serious programming concerns, I have found that this forum, hands down, is the one that always answers my questions.
    So that is one reason why I ask you, those I hold in a high regard than most, this simple, yet complex question:

    Should I learn C as my first language in the programming world?

    Being in my mid 30's, I have really missed the boat on technology. (yes, for all intents and purposes, I have been living in a cave)

    Up until three years ago, the last time I had been in front of a computer, I was eleven, learning the syntax of DOS.

    I have little preconceived notions of what programming entails. (In other words; I have not been saturated with hollywood hype, and I understand that learning any programming language will not mean I can "hack a Gibson" )

    I could continue in my marvel of how much technology has evolved and bask in the graphical "point and click" universe it has become....

    But, there is this part of me that yearns to know, "What is going on behind the curtains?"

    After looking into other language books, most of which assume that the reader already has experience with C, I decided C was the way to go.

    My intention, is to progress up to using Visual Studio (learning C++ then C# along the way)

    I understand that C is considered to be an intermediate language.
    Some unsolicited advice has been thrown my way that I should forget C, and learn Python, Pearl, Ruby, or Java as my first language.

    I have yet to get into advanced C, in fact I have yet to step into memory management.
    I am not in a class, nor do I have the funds or the ability to attend one.

    Just like learning any thing new and foreign, I am steadily learning the basics of C, with very few "Bang my head against the wall" moments....

    The internet, with Google as my primary guide, has provided me with several resources to learn from.

    So, considering what I have just stated, I refer to the aforementioned question:

    Should I learn C as my first language in the programming world?

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Sure, C is a fairly easy language to learn, just make sure you get a book that teaches it from the perspective of being a first time programmer. It helps if you remember enough about algebra to know what a variable is.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    You will get just about as many different answers as the number of replies you will get in this thread.

    But this is a C/C++ forum, so most people will suggest it's fine (it will probably be very different if you asked this question on a Java forum, for example).

    Though I think it is safe to say that, learning C for the sole purpose of going to C++ later is quite pointless. C++ does many things differently from C, yet is loosely a superset of C (you can do things "the C way" in C++, too, it's just not recommended when there are C++ equivalents, because C++ things tend to be more elegant). C# is something totally different. It's not any more similar to C than Java is. Don't be misled by the name (that's about the only similarity).

    My biased answer? Learning C++ (or C) as your first language is perfectly fine. That's what I did a few years ago and I found no problems with it.

    Scripting languages like Python, Perl, Ruby are pretty much "utility languages". They are mostly used to prototype new programs, automate system admining tasks, or some such. Not many "final products" are shipped in those languages. They have the advantages of being easier to learn (usually more relaxed syntax rules), faster to write in, and are usually more "friendly" (some can be used interactively, and programs don't need to be compiled). On the other hand, they tend to be around 10x slower than compiled programs.

    I think learning a scripting languages after C/C++ will be a lot easier than switching from a scripting language to C/C++.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,535
    In my opinion, it's largely irrelevant what language you learn first as long as you can separate each language syntax and programming practices from the others. That is, an unfortunate consequence of learning a programming languages (particularly one that resembles some other you will be using in the future) is that we find ourselves often in a situation in which we are unknowingly trying to put into practice a style of programming that was that of a programming language we learned before.

    - You learn C
    - You learn C++
    - You try to program in C++ as if it was C

    As long as you keep a sharp eye on this problem and try to make yourself as much aware of it as humanly possible, you should be fine.

    That said, since your objective is indeed to program in C++ or C#, I don't see a reason to start with C. Go immediately to C++ or C#. You will not gain any special new knowledge that you can't gain later in a more appropriate time. C doesn't serve as an introduction to C++ or C#. It will only delay your learning progress unnecessarily.

    I find that learning C++ (assuming this is the language I primarily want to work with) is more beneficial if done first. Later when you feel you are comfortable with it, you can start and learn bits of C here and there. This is going to further your knowledge in C++ inner workings and not produce the unfortunate side-effect mentioned above.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Banned View Post
    I understand that C is considered to be an intermediate language.
    Some unsolicited advice has been thrown my way that I should forget C, and learn Python, Pearl, Ruby, or Java as my first language.
    Intermediate to what? Learning C++? Maybe...but maybe not, as people have said, if what you really want is C++, learn C++.

    Vis., Python, Perl, and Ruby: depends why. There is sometimes a misconception that languages that can do a lot more in fewer lines of code (ie, are easier to use if you know them well enough) must also must be easier to learn, but there really is no logical reason to believe that and I promise it is not true (what would make sense would be the opposite*, since the reason they are "powerful" in this sense is the extent and complexity of the syntax). I think these languages make different degrees of sense in relation to one another if you are already familiar with some kind of higher level scripting language. There are a lot of good reasons to learn one, but one reason that is probably not good would be because you think this will be an "easier" introduction to programming than a compiled language. Not true.

    I have noticed that some material that originates in the academy (of a particularly orthodox/traditional nature) tends to obfuscate some issues here, possibly because many academics "look down" on the scripting languages, most of which originate outside of the academy (as opposed to the compiled languages, which generally are academic in origin). So one way to be dismissive, ironically, is to say, "they would be good for beginners because they are so simple, before you move onto a real language, like mine" which is ridiculous, but I still see sentiments of this sort coming from CS students, who I guess take their professors for omniscient powers**.

    * I wouldn't bother arguing that way either; I'm of the opinion that generally speaking, there is enough difference between various languages that trying to sort the "easy" from the "hard", learning curve wise, is a subjective crap-shoot. C has a relatively small basic syntax, and in that sense it would be easier to learn because there is less of it. However, it also does not provide a lot of built-in functions, etc, that most other languages do, meaning you have to learn techniques for using that small syntax in complex ways that other wise you probably wouldn't have to, so in the sense of learning to accomplish a specific goal, you could say C is harder to learn, because there is less of it.

    ** you can learn "hello world" quickly in anything. If you live in a sheltered place and believe that is all there is to do in (eg) perl, then you will have some wacky opinions about it, which maybe this is the person with the "unsolicited advice". I notice there are now several books out on programming bioinformatics in perl, which has GL bindings -- now there is a nice bunch of simple tasks for all those dumb scripting apes
    Last edited by MK27; 08-08-2009 at 11:32 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

  6. #6
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    I recommend not to choose low level languages such as C, C++, even Java for it is low level and you might (forced to) learn unecessary complex things such as pointers, memory allocation, classes and main method.


    You just need to know "why it works that way", and finally you'll find out "I might do this to get it to work".


    Not "what is it?" or "what is that?"


    However to know what "int" is just slowing down your learning process.
    Just GET it OFF out my mind!!

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,919
    I wouldn't call C++ or Java low level.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    One Level Below Beginner
    Join Date
    Jul 2009
    Location
    Corner of Nowhere and Yonder
    Posts
    19
    I appreciate everyone taking the time to read my post, and giving a well thought out reply.

    After browsing a few beginner tutorials for C++, I see what some of you are referring to....

    C is to Spanish as C++ is to Portuguese (they are alike in some areas, and vastly different in others.)

    I did, however, make the assumption that C was a stepping stone to C++

    For that, I feel mortified that I did not read up more on the language of C++ before I started this thread, and I apologize for my naivete.

    My intentions were to learn both languages anyhow, so you might see me jumping from one subject of the forum to the next.

    Learning two languages at the same time might not seem ideal, but I am confident that I am able to keep one set of rules and usages separated from the other.

    Again, thank you.

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by audinue View Post
    I recommend not to choose low level languages such as C, C++, even Java for it is low level and you might (forced to) learn unecessary complex things such as pointers, memory allocation, classes and main method.
    The OP is asking about C not C++.

    C is Turing complete without the use of explicit pointers or memory allocation. C doesn't have classes, and the main function is present in every modern language, even if its called something different.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  10. #10
    In my head happyclown's Avatar
    Join Date
    Dec 2008
    Location
    In my head
    Posts
    391
    I've been programming in C for about 8 months, but I've now ditched in in favour of VB, because I now want to program for Windows.

    I really enjoyed C, and did put it to good use by creating little file editing utilities.

    Before you wade too deeply in C, ask yourself what is it that you ultimately want to achieve, and then ask yourself what is the right language for the job.

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    because I now want to program for Windows
    Which, of course, is also possible to do in C/C++.

  12. #12
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,266
    Odd. I've been writing Windows GUI applications in C for the last 10 years.
    I started out with VB 6 but had to move away from it due to its "mis-integration" with the Win32 API making me feel like I had to acquire a firearm and teach people on the street about what its inflexible typecasting meant to them.

    If you're just interested in the classes aspect of languages, I've found that in most cases people aren't serious about it and end up making classes that they don't reuse, so arguably they could've implemented the same in C with separate data/functions and zero performance difference.

    I know about the basics of C++ (although I do know Java better, thanks to university bias), but it is hard to shake the C habit once you've picked it up.

    I think I need to go to rehab.

    On the plus side though, my debugging skills are first rate.
    Last edited by SMurf; 08-09-2009 at 08:22 AM. Reason: Forgot about the debugging bit

  13. #13
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    You try to program in C++ as if it was C
    This bad habit produces some of the ugliest C++ code I have ever come across. It is my opinion you should learn C++ b/c the C will come for free as you encounter various issues. There is no real reason to learn 100% C b/c in that regard it does do things quite differently. Learning a mix of C/C++ is what I would recommend but focus primarily on the C++ object oriented aspect.
    This is a biased opinion but that's what you get when you come to a C/C++ forum. Go and ask which car is the best to drive on a Ford forum and I betcha they will tell you Ford's and they will have 1 million reasons for it.

    I recommend not to choose low level languages such as C, C++, even Java for it is low level and you might (forced to) learn unecessary complex things such as pointers, memory allocation, classes and main method.

    You just need to know "why it works that way", and finally you'll find out "I might do this to get it to work". Not "what is it?" or "what is that?"
    ...
    This is the worst advice I've seen yet. Just take for granted it works but then not care why or how? How can you ever know how it works without understanding the fundamentals?
    What is wrong with learning pointers and memory allocation? If you want to dumb down the masses please do it elsewhere. I say dive right into the nitty gritty, learn it, love it, and then slowly back off and learn to abstract things. Do pointers scare you? Then dive head-first into them and crash and blue-screen to your heart's content until you figure them out. You will be a better C/C++ programmer in the end.
    Do NOT avoid the hard stuff b/c you fear you will be discouraged. Eventually you will have to face it. No work place is going to give you bugs and projects that are centered only around 'what you know works or what you are familiar with.' Most of the time you will leave the meetings scratching your head wondering how to correctly implement what they want.
    If you take the easy route and avoid the 'hard' stuff or the stuff you are weak in you will never become a good programmer.

    However to know what "int" is just slowing down your learning process.
    So wrong. Not knowing what int is or how many bytes an int is or when to use it is slowing down your learning process. We sure would not want people to know what an int is b/c then they might actually be able to do more than call blindly out to some 3rd party API. I cannot believe I'm reading this.

    I've been programming in C for about 8 months, but I've now ditched in in favour of VB, because I now want to program for Windows.
    Seriously? Why? C# is far better than VB in nearly every respect. I do not know any one who would want to write their entire application in VB. Error handling is awful, objects are pseudo-objects, and it's use of the Win32 API is horrendous. Going from C to VB is like choosing to walk to get everywhere when you can just get your license and drive.
    Last edited by VirtualAce; 08-09-2009 at 11:19 AM.

  14. #14
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Bubba View Post
    Going from C to VB is like choosing to walk to get everywhere when you can just get your license and drive.
    To be fair, as happyclown does explain here, I think this is because s/he is using it for basic file op stuff -- the tasks people think of as classical scripting ones. I do not know anything about VB and it's limitations, but if it is even a halfway decent scripting language it will be way more convenient for this than C/C++. I would say an analogy might be between choosing to walk to the corner, and getting the plane ready for a short flight In all cases, the walk will be quicker and easier.

    If all you want to do is batch process some text files, or other administrative tasks, you'd have to be a fool to bother using C/C++ (unless that is the only language you are comfortable with, in which case there are no other choices). VB was recommended to happyclown based on the nature of his/her intentions and chosen platform.

    The Ford dealer may say anything, but hopefully has not become so deluded as to believe it.
    Last edited by MK27; 08-09-2009 at 11:27 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

  15. #15
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    I've been programming in C for about 8 months, but I've now ditched in in favour of VB, because I now want to program for Windows.
    Then this statement is inaccurate. This says he is ditching C in favor of VB because he now wants to program in Windows. Based on the context of this statement this infers that somehow C cannot be used to program in Windows and VB is better for it. The statement should have been I'm choosing to use VB because it better suits my current task than C. Even then I can barely make the connection.
    Last edited by VirtualAce; 08-09-2009 at 12:23 PM.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language to learn
    By ajrillik in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 08-15-2005, 07:36 PM
  2. How to make a thread sleep or std::recv timeout?
    By BrianK in forum Linux Programming
    Replies: 3
    Last Post: 02-26-2003, 10:27 PM
  3. Multithreading
    By Cela in forum Windows Programming
    Replies: 13
    Last Post: 01-15-2003, 03:02 PM
  4. Your Best thread and your most stupid thread ??
    By jawwadalam in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 01-03-2003, 07:41 PM
  5. Multi-Thread Programming
    By drdroid in forum C++ Programming
    Replies: 6
    Last Post: 04-04-2002, 02:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21