PHP Developers Network

Learning C and Objective C... advice?
Page 1 of 1

Author:  Luke [ Sun May 26, 2013 1:44 am ]
Post subject:  Learning C and Objective C... advice?

Hey y'all! Long time no post! I've decided to venture into the wonderful world of C and eventually Objective C. I bought a book on Objective C which gives kind of a crash course in C, but I would actually much prefer to build my objective c knowledge on a solid foundation of C. So, can anybody suggest some good ways to learn C properly? The first language I ever learned was PHP (unless you count my rudimentary knowledge of javascript in the late 90s, which I don't) and I feel like coming from a PHP background has spoiled me as a programmer in a lot of ways. I know much less about how things work under the hood than I really should and that is one of the major reasons I want to learn C. So... can anybody point me in the right direction? This forum basically taught me how to program properly so I trust you guys to steer me right!

Author:  Weirdan [ Sun May 26, 2013 4:14 pm ]
Post subject:  Re: Learning C and Objective C... advice?

Kernighan & Ritchie is a never fading classic.

Dabbling into microcontroller programming might have some benefits as well: you'd be exposed to a lower level of a simpler architecture, learn some C (and soldering :) ) and could create something useful, all at the same time.

Author:  Luke [ Sun May 26, 2013 4:40 pm ]
Post subject:  Re: Learning C and Objective C... advice?

Weirdan, I spent probably 3 or 4 hours last night reading about assembly programming concepts. I had downloaded this book on programming C and it mentioned assembly a few times, which got me curious. So I started reading about assembly and before I knew it, hours had passed. But it was interesting stuff. I certainly am learning how much I don't know :-D

Author:  Weirdan [ Sun May 26, 2013 7:16 pm ]
Post subject:  Re: Learning C and Objective C... advice?

Life is too short to code in assembly, but knowing basics never hurts.

Author:  mecha_godzilla [ Mon May 27, 2013 5:25 pm ]
Post subject:  Re: Learning C and Objective C... advice?

Because C itself is fairly minimal, you should be able to pick up the basics very quickly - having just started programming in C myself, I've found that many of the design decisions in PHP have been directly influenced by it. That said, I have two C books to hand and neither of them gets beyond basic command line operations (even after several hundred pages). To really understand C in modern usage, I think you need to find yourself an open source/free project and start learning how to use libraries - maybe start with an audio player project, something that will make extensive use of libraries, file i/o operations, etc. Just make sure that the project is about something you're interested - music, graphics, emulation, whatever - so that you have some incentive to really spend time learning about it. I submitted my first patch for a free software project after I found that the audio export function worked in earlier versions of the software but not later ones, and wanted to fix that issue.

At around the same time I started learning Objective C as well, but it made *no* sense to me at all given what I knew about C by that point - and prior to that I had a reasonably good understanding of assembler from some Z80 development and PIC microcontroller projects.

Mecha Godzilla

Author:  McInfo [ Sun Jun 02, 2013 10:15 pm ]
Post subject:  Re: Learning C and Objective C... advice?

If you have hours to spend watching lectures, are an excellent starting point for learning C. Watching those videos and carefully reading "The C Programming Language" by Kernighan and Ritchie (ISBN 0-13-110362-8) should give you a solid understanding of the language.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group