PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Jun 24, 2019 9:39 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sun May 26, 2013 1:44 am 
Offline
The Ninja Space Mod
User avatar

Joined: Fri Aug 05, 2005 1:53 pm
Posts: 6424
Location: Paradise, CA
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!


Top
 Profile  
 
PostPosted: Sun May 26, 2013 4:14 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
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.


Top
 Profile  
 
PostPosted: Sun May 26, 2013 4:40 pm 
Offline
The Ninja Space Mod
User avatar

Joined: Fri Aug 05, 2005 1:53 pm
Posts: 6424
Location: Paradise, CA
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


Top
 Profile  
 
PostPosted: Sun May 26, 2013 7:16 pm 
Offline
Moderator
User avatar

Joined: Mon Nov 03, 2003 7:13 pm
Posts: 5978
Location: Odessa, Ukraine
Life is too short to code in assembly, but knowing basics never hurts.


Top
 Profile  
 
PostPosted: Mon May 27, 2013 5:25 pm 
Offline
Forum Contributor
User avatar

Joined: Wed Apr 14, 2010 4:45 pm
Posts: 375
Location: UK
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


Top
 Profile  
 
PostPosted: Sun Jun 02, 2013 10:15 pm 
Offline
DevNet Resident
User avatar

Joined: Wed Apr 01, 2009 1:31 pm
Posts: 1532
If you have hours to spend watching lectures, Richard Buckland's computer science courses on YouTube 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group