Learning a C based language, recommended starting points?

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 4494 Views - Last Post: 28 December 2011 - 08:35 AM

#1 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Learning a C based language, recommended starting points?

Posted 25 December 2011 - 02:04 PM

Hay all,

My new years resolution is 1280x1024 (hahaha). Actually it's to learn a C based language such as C++ or Objective-C. Ideally, I'm looking for suggestions for learning resources. I've learnt a lot of my other languages from books and further practice, so books (especially those with kindle editions) would be best.

And anyone with experience in this sector - which C based language is most transferable? This is really to be a leg into uni, I have loads of programming experience, but I've always pussy footed around C unless it had Sharp in the name. C scares me. But time to learn. I'd love to be able to work on a variety of platforms with a single language (mono and c# are my go-to pair) that is as powerful as it is extensible.

Any help is really appreciated!
Merry Christmas DIC!

Is This A Good Question/Topic? 0
  • +

Replies To: Learning a C based language, recommended starting points?

#2 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Learning a C based language, recommended starting points?

Posted 25 December 2011 - 02:11 PM

> Actually it's to learn a C based language

I find the term "C-based" to be curious. Either you want to learn C, or C++, or you don't want to learn either of those two languages. Any syntactical similarities to C are irrelevant.

> But time to learn. I'd love to be able to work on a variety of platforms with a single language

You should understand that while C and C++ are portable languages, there isn't much of a library and there is no standard platform. Want to walk through the filesystem? Platform specific. Create a GUI? Platform specific. Open up a socket? Platform specific. Multithread? Platform specific. Etc.

So make a decision as to whether you want to learn C, C++, or some other language.
Was This Post Helpful? 0
  • +
  • -

#3 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Re: Learning a C based language, recommended starting points?

Posted 25 December 2011 - 02:16 PM

If I had to choose, it would be C++. It seems to be the defacto standard in the industry. Its certainly going to be the primary language at Uni.

So C++ it is!
Was This Post Helpful? 0
  • +
  • -

#4 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 06:28 AM

C++ Primer, 4th Edition has been recommended to me. Looks really good, it seems well thought out and nicely structured..
May be the one to buy.
Was This Post Helpful? 0
  • +
  • -

#5 111027  Icon User is offline

  • D.I.C Head

Reputation: 17
  • View blog
  • Posts: 141
  • Joined: 26-December 11

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 07:17 AM

Actually, i would like to recommend you to start with C. I realize it might seem a strange thing to say, let alone do - i thought so as well - but my university opened my eyes on that this semester. C is a very, very good first language because of the following reasons:

1. It's a dead simple language - you get variables, loops, selections, functions, arrays and pointers. That's about it - less material to learn, more a chance to keep it to the concepts
2. It's portable - every modern computer system offers a C compiler. Even more, almost all embedded programs are C programs.
3. There is no large standard library . Now some might chastise me for saying this is a good thing, but it actually is. Not only it eliminates bloat and severely reduces the learning curve, it actually means you'll have to go trough all the traditional rites of passage programmers need to go to, and expose you to a lot of the basic concepts, such as null termination.

Just my two cents - hope you make a good decision.
Was This Post Helpful? 2
  • +
  • -

#6 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 08:00 AM

View Post111027, on 26 December 2011 - 07:17 AM, said:

Actually, i would like to recommend you to start with C. I realize it might seem a strange thing to say, let alone do - i thought so as well - but my university opened my eyes on that this semester. C is a very, very good first language because of the following reasons:

1. It's a dead simple language - you get variables, loops, selections, functions, arrays and pointers. That's about it - less material to learn, more a chance to keep it to the concepts
2. It's portable - every modern computer system offers a C compiler. Even more, almost all embedded programs are C programs.
3. There is no large standard library . Now some might chastise me for saying this is a good thing, but it actually is. Not only it eliminates bloat and severely reduces the learning curve, it actually means you'll have to go trough all the traditional rites of passage programmers need to go to, and expose you to a lot of the basic concepts, such as null termination.

Just my two cents - hope you make a good decision.


Interestingly, a lot of people discourage that idea because of my background in C# and Java. The primer book was recommended because I know so many languages, that I need to drop back to basics to learn C++

My choice of Uni is big on C++... And python, actually, but I'll cross that hurdle later...

And learning curves are no issue, I'm a quick learner with a huge capacity for knowledge.
Was This Post Helpful? 0
  • +
  • -

#7 111027  Icon User is offline

  • D.I.C Head

Reputation: 17
  • View blog
  • Posts: 141
  • Joined: 26-December 11

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 08:07 AM

You make your own choices, dude. Still, figure this: when learning how to program, learning a language is the least of your problems. There's a whole lot to cover:


- Structured programming
- Hardware basics
- Algorithm theory
- Data structures
- Discrete mathematics
- So many other things

Thus the Keep It Simple reply.
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5432
  • View blog
  • Posts: 11,643
  • Joined: 02-June 10

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 09:23 AM

We can help you by saying "First learn basic programming and the language of C#. Then take on assignments." Could someone here write this program for you? Sure. Could someone here map out all the processes you need to follow and do the Software Design part of this in the slim hope you could code it from there? Sure. But we don't volunteer to do the job that you're either getting paid for, or getting a grade for. You may want to read this.

For now, just work on the lessons. Do a self-teaching book from cover to cover. Then consider writing a program.

Don't try to create a useful working program to fit a need of yours (or a for-pay contract) as your introduction to coding project. When you are learning to code you don't know enough to code a program, let alone know how to engineer the architecture of a program. It would be like saying "I don't know how to read sheet music, or play an instrument. I think I'll write a 3 act opera as my first learning experience."

I don't say this to be mean. We've seen lots of new coders take this approach and we know it doesn't work. Trying to design your own programs before you understand the basics of the code language you've chosen just leads to problems, frustrations, and 'swiss-cheese' education (lots of holes).


Resources, references and suggestions for new programmers. - Updated Nov 2011
Spoiler

Was This Post Helpful? 0
  • +
  • -

#9 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 10:39 AM

I may need to rephrase. I've been programming for 6 years, I understand the fundamentals and I'm proficient in a variety of languages. I've worked professionally using C# with Mono and .NET for a number of clients over the past 2 years, but what I'd like to do is learn C++ to give me a broader reach and to help me when It comes to uni - so I'm not presented with a language i know nothing about.

I'm certainly not a beginner programmer, but C++ is new to me and so I'd like to learn it before hitting up tutorial sites and building on the knowledge. Else I'd have hit the tutorial section way before now. But i like to learn from books as it's where most of mu knowledge has come from, tutorials are where i turn afterwards to help enforce what the book has taught me.

so that's why i was asking for book suggestions. :)

Edit - I start uni next year

This post has been edited by pryogene: 26 December 2011 - 10:41 AM

Was This Post Helpful? 0
  • +
  • -

#10 111027  Icon User is offline

  • D.I.C Head

Reputation: 17
  • View blog
  • Posts: 141
  • Joined: 26-December 11

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 10:48 AM

Well, then. If you insist.


http://www.amazon.co...r/dp/0789721449
http://www.amazon.co...l/dp/0471606979

Books for experienced programmers, such as yourself. Have a blast.
Was This Post Helpful? 0
  • +
  • -

#11 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5432
  • View blog
  • Posts: 11,643
  • Joined: 02-June 10

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 10:49 AM

9 posts later and we finally get to the actual question:

"Can you recommend some good C++ self-teaching books?"

No offense, but while you're working on C++ you should also work on how to communicate your needs and thoughts. If I had to go through that type of process with you at work for everything we collaborated on I'd be asking for re-assignment to a different team.
Was This Post Helpful? 0
  • +
  • -

#12 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10364
  • View blog
  • Posts: 38,376
  • Joined: 27-December 08

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 10:57 AM

We do have a pinned C++ Books resource thread in the C++ Programmers forum you may find helpful. :)
Was This Post Helpful? 1
  • +
  • -

#13 pryogene  Icon User is offline

  • The Leafiest of the Leif's
  • member icon

Reputation: 42
  • View blog
  • Posts: 670
  • Joined: 30-June 09

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 11:17 AM

View Post111027, on 26 December 2011 - 10:48 AM, said:

Well, then. If you insist.


http://www.amazon.co...r/dp/0789721449
http://www.amazon.co...l/dp/0471606979

Books for experienced programmers, such as yourself. Have a blast.



Sarcasm isn't appreciated. I'm completely new to C++, or did you miss that fact? I'm completely aware that i need to start from basic for Cpp, but you and your constant synicism seem to have overlooked that. Stop flaming me, please.

Toq: that question was clear, people were spending more tome flaming me and assuming i was a noob than actually answering, very unlike the usual DIC bunch I made it clear enough that i had experience in other languages but wanted to start new, and i also expressed clearly that C is not a good place for me to start as that would be going backwards, as many an informed person has told me.

Macosxnerd: Thanks, that's the first useful answer that hasn't involved flaming me. Much appreciated. Any other suggestions from anyone would be appreciated, but hold the abuse?
Was This Post Helpful? 0
  • +
  • -

#14 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Learning a C based language, recommended starting points?

Posted 26 December 2011 - 11:19 PM

Shortlist of books that C++ programmers pretty much go through. C++ Primer by Lippman isn't on the list, but it should be at the top with Accelerated C++.

AC++ is a good counterpart to the Primer book. It's hard to understand how idiomatic C++ is constructed if you just see a list of features. But AC++ is not a reference book, so you'll need something like Primer to look up.
Was This Post Helpful? 0
  • +
  • -

#15 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,681
  • Joined: 19-March 11

Re: Learning a C based language, recommended starting points?

Posted 27 December 2011 - 06:07 AM

I've looked at Lippman - found it pretty useless, though I can see how the beginner might find it handy.

I would suggest learning straight C through Kernighan and Richie, then look at Stroustrop on C++ once you're comfortable writing some moderately complex programs in straight C. Working through the standard DS&A stuff - write the basic data atructures and something to exercise them - would be a reasonable benchmark to tell you you're ready to move to C++.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2