Jump to content


Photo
- - - - -

Learning C/C++


  • Please log in to reply
9 replies to this topic

#1 candy_flipper/serial_killer

candy_flipper/serial_killer

    n00bie

  • Members
  • 10 posts

Posted 09 October 2006 - 10:03 AM

I want to hear from anyone with experience in either language, I'm like to learn more about how hardware & software work. I'll have some time to spare for quite a while and likely 4-10 hrs/week.

What would a realistic time line be to become proficient in C then graduate to C++.
Ideally what ground should I be expecting to cover over the next six months.

Here's the caveat, I'm not the brightest, no mathematician and next to no programming experience, other than very basic acquaintance with C years ago in Macintosh Workshop and Visual Basic not so long ago. OK so please keep this in mind when you say 'oh it only took me three weeks to learn how to re-work my linux kernel in C++'

#2 arewhyainn

arewhyainn

    Cryin' Ryan

  • Banned
  • 401 posts
  • Location:Pasadena, TX

Posted 09 October 2006 - 10:09 AM

As eazy as abC, j/k

On a real note knowing math is your biggest help, because programming and math go hand and hand. You will have to learn C before C++, unless you want to make it alot harder then it needs-be. Just go buy yourself a copy of C for dummies and get started. That is where I started, and even though. I don't program, I do know how to do it. I just find programming very boring.

#3 candy_flipper/serial_killer

candy_flipper/serial_killer

    n00bie

  • Members
  • 10 posts

Posted 09 October 2006 - 10:34 AM

Wow arewhyainn a speed record! Thanks for the quick response.
"buy yourself a copy of C for dummies" funnily it's what I started with on the mac.
For pacing I think I'll go checkout CS at a local Uni and get their course outline.
Oh and as for the jokes please, please, please.
:D

Edited by candy_flipper/serial_killer, 09 October 2006 - 10:35 AM.


#4 signull

signull

    SUP3R 31337

  • Members
  • 160 posts

Posted 09 October 2006 - 10:59 AM

On a real note knowing math is your biggest help, because programming and math go hand and hand. You will have to learn C before C++, unless you want to make it alot harder then it needs-be. Just go buy yourself a copy of C for dummies and get started. That is where I started, and even though. I don't program, I do know how to do it. I just find programming very boring.

It's a myth that you need to learn C before learning C++. There's really no valid reason why someone new to programming cannot begin with C++.

#5 arewhyainn

arewhyainn

    Cryin' Ryan

  • Banned
  • 401 posts
  • Location:Pasadena, TX

Posted 09 October 2006 - 11:19 AM

It's a myth that you need to learn C before learning C++. There's really no valid reason why someone new to programming cannot begin with C++.

not, really I start learning C by using programming C++, and I moved to C and found it alot eazier.

#6 Ohm

Ohm

    I could have written a book with all of these posts

  • Members
  • 3,209 posts
  • Gender:Male
  • Location:Maine, USA

Posted 09 October 2006 - 01:38 PM

Personally, I wouldn't start with C or C++. If you want to learn to program, neither language is ideal for its own reasons. C can be very archaic. It's very low-level, which may be what you want, but puts huge boulders in your path to learning how to get things done. C++ is a nightmare. It's large, complex, convoluted and just plain hard to learn. It's not a language to start out with, unless you're stuck with it.

Go for a pure top-down or bottom-up approach. If you really want to learn about hardware, operating systems and all that tasty low-level stuff, you can start with assembly language. Many people disagree here, because they think it's too difficult to use. Since you won't be using it to make large programs that actually do useful things (which is difficult in assembly , and takes considerable skill), this just isn't a concern. Also, once you understand assembly, C will be a snap to understand. The biggest difficulty of understanding C is knowing what's really happening behind the scenes. Without that, you'll never really understand your C code.

A top-down approach would mean starting with one of the modern dynamic programming languages. I love Ruby, but it's for the OO purist (that means if you don't already have a strong grasp of OO concepts, perhaps you should skip it for now). Python is a good place to start. It's easy to learn and has TONS of free documents and books you can get for free over the internet (and python itself is free too, of course). Starting with top-down means you'll be writing more useful programs earlier, but you won't understand what's really going on until later.

People learn at their own pace. Don't set schedules for yourself, artificial goals don't help anything. The important part is to be learning something. Don't mess around for months or even weeks looking for the "perfect" approach, just start learning something. Whatever you learn, whether high-level or low-level can be applied to the next thing you learn. Don't think you're trapped in whichever language you've learned either. If you think it's time to move on, learn another language, all the concepts you learned from the previous language will help you, so don't be too unsure of "abandoning" all the time you invested in learning a particular language. Remember, it's the concepts that are important to learn, not the specifics of the language. Once you understand all the concepts, learning new language is a snap. If you just learn from "tutorials" (type this, and you'll get this result), you'll never move from that language.

#7 livinded

livinded

    Dangerous free thinker

  • Agents of the Revolution
  • 1,942 posts
  • Location:~/

Posted 09 October 2006 - 11:07 PM

4-10 hours should be fine. As far as c/c++, i've been teaching myself c for the past year and a half and just started reading about c++ maybe a week ago. I know for myself, the concept of object oriented programming has been difficult to grasp at and many times just seems stupid for the examples. As far as which one you want to learn first it really is up to you and what you want to do. Both would be a good language to start with becuase they both get to right into programming and develop concepts that virtually any other language wll have. As far as good books for learning c, i'd recomend Practical C Programming from o'reilly (I found this to be confusing at times until I really understood what I was doing) K&R for reference (these are the guys to wrote the c programming language, kind of a boring and straight to the point book but gives excellent examples and will really teach you the language) and last, teach Yourself C in 21 Days(most peopl will cringe at this book but as far as easily explaining concepts it does a great job. But it is a bit out a date and some of the methods used are insecure. I'd suggest reading this first and moving onto the o'reilly book to get a look at the more commonly used methods used today)

#8 Aghaster

Aghaster

    The Frenchman

  • Agents of the Revolution
  • 2,093 posts
  • Country:
  • Gender:Male
  • Location:Quebec, Canada

Posted 09 October 2006 - 11:13 PM

If you wanna do C++ you can try my own tutorial at www.planetcpp.info
If you wanna know more about how computers and software work, just get a good assembly language book, such as "Assembly language step-by-step" by Jeff Duntemann. You can't be wrong with that book.

#9 candy_flipper/serial_killer

candy_flipper/serial_killer

    n00bie

  • Members
  • 10 posts

Posted 10 October 2006 - 04:49 AM

F**ken A. You have all given me a much better idea of how to start (just do it) and a list bunch of good books.
I'll look into Python & asm as well.

Ohm, Interesting advice. I was trying to avoid asm I just assumed I’d need to use it with an emulator. Your right about the goal setting- it's not worth getting stressed about but I think I do need some sort of goal to help motivate me, hell I was supposed to be finishing some (five) assignments but just spent the day pissing about on the net.

Aghaster, thanks for the link. btw nice jumper.

livinded, what can i say CHEERS I’ve been looking for some non-technical books for some fast gratification; the shopping list is sitting on my table for tomorrow.

#10 eliasd

eliasd

    H4x0r

  • Members
  • 38 posts

Posted 11 October 2006 - 02:31 AM

The best way to learn a language is aggressively. Get some bawls or rockstar, read through the first few chapters of an introductory book and write a 100 line program, all in one night. Here are some other suggestions:
1) Pick a decent IDE. You really don't want to be worrying about command line options and shit while you're learning. On windows, the commerical IDE's are vastly superior to any of the free ones, so do yourself a favor and spend a few bucks.
2) Consider a high level language. There's no reason (besides ego) to start with C. Those with interactive shells like Python, ruby and lisp/scheme are ideal.
3) Stay the hell away from C++. C++ is to C as cancer is to the lung.

Edited by eliasd, 11 October 2006 - 02:41 AM.





BinRev is hosted by the great people at Lunarpages!