Oh, say, can you 'C'?


Where can I find some good *free* online books or tutorials or whatnot on simple C programming? I'm making my dreams of becoming a programmer true! Yay!

And: is C a good thing to program in? I mean: will I be able to create good things? Thanks!


cocoa love
Admiral is right as usual. C does suck! C is so confusing especially for advanced programmer like myself:p (its a joke) Well yeah i use Objective-C alot but i never ever use C. C is too confusing and all anybody really needs is just the basics of declaring and defining variables, and one is good in no time :D



Not a Moderator
Maybe if you understood the basics of C, you wouldn't have to pay people to answer your questions?



cocoa love
Yeah Yeah Yeah, shut your hole,:p i was having alot of trouble with it. I was very desperate for an answer. The basics of C has nothing to do with Communicating between Objects and messaging.



Heh. Strange: i've stepped up to C++ over night. :)


Be wary of the waters of C++. Honestly, you'd be better off learning Java, then taking the next step (yes, the damn pun is going to be intended) and learning Objective-C. Main Reason: C++ is totally dependant upon the compiler you're using. Each company that creates a C++ compiler tends to rewrite whatever parts it feels like to get all the objects and callbacks to work on the given platform. Code looses not only portability, but if they decide to change the libraries or headers, or you start using a new compiler... You'd be rather out of luck. Objective programming doesn't really take kindly to redundancy. Other Reason: Objective-C, though not clearly documented anywhere, is rather easy when you know Java. Just trust me on this one: The documentation reads about the same and the constructs run on a similar note (my own valued opinion).

But again, these are just my thoughts.

Isn't it good to know that M$ uses a sturdy and stable OS like BSD for their networks instead of the crap that they sell?


Dudez, I love C! I much prefer the C stdio.h syntax over the C++ iostream.h BS!

I've started off my "real" programming with C, but knowing the fundamentals of data types and arrays and such from VB really helped me get a grasp very early on. And From what I've seen, after learning C, you'll learn other languages in no time.

Java is a beautiful language! Learn it, use it, love it!

I would start by doing a basic search on google. There aren't that many things to really have to "memorize" everything after that is practicing and learning other people's libraries to help "you" out!



cocoa love
Here i am in Englsh 3 class (again) watching the freaking scarlet letter (again). Maybe i shouldve took some of Admiral's advice when i was drunk. Well anyways, i say screw C and Java, and go with Objective C. If you read some documentation on it, or watch ADC's Cocoa Video, you'll see that it is able to be learned in a day or 2. Hope that helps.



Simply Daemonic
C cucks (pronounced sucks :p)
I love java, I have not yet dabbled with obj-c. It stinks that apple replaced obj-c in their webobjects with java, but hey. Anyway, I wanna learn (or adapt to obj-c) but I have not time :p
Between full time work, full time classes, web site maintanence, my music quest, my learning foreign languages and my DJing... no time lol... maybe sometime in the summer he he (or when I graduate :p)



a bastard.
This may sound horrid, but, for me at least, the easiest way to learn 'programming' ( god that's a generic term ) was actually through the following:

C++ and stdio.h for basics.

Learn how to declare variables, and accept user input, as well as basic functions and, if you're feeling bored, classes.

ASP or ColdFusion ( Not PHP!)

Either one of these languages, while PC centric, will, over time, got your brain, at least a little, around Objects. Amazingly enough, for low-end needs, ASP is an excellent language, especially for newbies. ColdFusion is by far the easiest thing in the world to learn, however, for insanely complex custom classes and objects, can leave your feeling hi-and-dry.


Simple put, a marvelous language. Begin with Bill Briggs tutorials on MacCentral, and go nuts making your Mac programs do strange things. While yes, AppleScript is primarly procedural, I found in gave me insight into how the Macintosh handles very basic elements, such as graphics, and text, as well as priorities. I'd recommend futzing with FileMaker Pro.


Woo-HOO! After your brief tutorial in C++, basic java applications, read no Swing, will be a breeze. Once you start building applets, using swing ( no JBuilder! ), yuo'll find Java is a marvelous language, even though some things are amazingly tedious.


Read apple's objective C guide, and just try futzing with the Foundation toolkit. The more you learn about objects in C, the better off you are.


Finely the holy land. Hopefully, you should now feel right at home withe concept of objects, as well as basic syntax, and what a language is capable of.

Again, this is just how I have gone about over the last year, and I can succesfully say, it works wonders.

Or...you could be cheap, and just learn REALBasic.
The language capable of everything, that no one uses for anything.



Just wondering why you said not PHP. I suppose you're not joking. But it seems that some of the syntax of PHP is the same as Objective-C like other languages such as these...

using ; at the end of a command
containing functions and stuff inside {}
comments are the same // & /* */
use @ symbol at the beginning of a line to withhold errors (I am only assuming this about Obj-C, so if I'm wrong, flame me)

Anyway, I want to learn OO programming, and I though objective-c would be a good step for me.

All I have done is HTML (yeah i know, its only markup), basic AppleScript, simple Javascript, basic lingo, basic ASP and now PHP.

I have a look at language examples such as C, C++ and Obj-C and I am confused (just as I was about other languages until I played around a bit), so I don't think I'm that hardcore but I want to eventually be doing that sorta stuff.

Can someone point me in the right direction? I was thinking about buying the O'Reillys book on "Learning Cocoa" which is an Objective-C with cocoa (obviously).


a bastard.
First, on why not to learn PHP...

The language is actually more similar to PERL then anything else, and, if you've ever learned PERL, it's a genuinely powerful, extremely annoying language. PHP is precisely the same way. You can do anything in PHP, from on-the-fly image creation, to advance array sorts and custom classes, but, jesus christ it's hard. PHP is the scripting language for people who know scripting languages. ColdFusion and ASP offer a more "Hi." type of approach. Again, this is just what frustrated me. Your milage may very.


It will only confuse you.

Trust me.

Instead, download, or get from FatBrain, Apple's "Inside Objective-C" book. Excellent read, focusing entirely on language, and not on Application Kit. After you've played with some of those ideas, then get Learning Cocoa.


What part of C sucks? The part that is the foundation to Objective C, Java and C++. Everyone knows that all of these "object" based languages are supersets of C, right?

Pull any good book on Java, C++ or Objective C and there will be a good chance that the author will point you toward "The C Programming Language" by Brian Kernighan and Dennis M. Ritchie. If you don't know who these guys are then you don't deserve to be programming in anything else but BASIC. C has a restrictive feeling because it forces people to code right the first time.

I'm not saying that everyone should program in C, because I don't. I love Objective C and even Visual Basic (ahh did I just plug MS!!). All I am saying is that C deserves more respect than what I see here in this thread. I slaved through learning C because a computer science friend recommended it to me. I'm glad he did because I can't count how many times I'll just do things quick and dirty in C to speed my coding up (yes this is legal to do in most cases).

Think of C as the ABC's to programming in any popular dynamic object-oriented language.


I love PHP. Its such a beautiful language. The syntax got me confused at first and my first test was a parse error (how convenient) :) but now its like a second language (wait it is a second language - or maybe 4th). I used to find javascript syntax confusing (although still able to make my own) until I learned PHP. Its pretty much the same in basic syntax. With ASP, I only know the simple stuff, but it can get very complex very quickly (if you mess with filesystem objects, regex etc) and the syntax (what syntax) is very open, and this can also cause people to be sloppy coders. Although in PHP there are some very cool preset functions and stuff which can make producing powerful pages fast and easy. I suggest learning ASP (basic operation, passing variables etc) and then move on to PHP when you want to do the real stuff.

In terms of real programming, such as C++ and Objective-C etc, don't ask me, cause I don't know yet, but I know that knowing HTML is a huge headstart when producing ASP an PHP, and I've met some people who think HTML is difficult.


a bastard.
So, there you have it folks.

HTML is considered difficult.

Actually, HTML is difficult.

Not the syntax. Fuck, the syntax is child play.

But instead, the very idea that a language, designed around being a structural description language has become a display language.

When Berners-Lee created HTTP and HTML v.1 ( on a NeXTSTEP nonetheless, the ancestor of OS X! ), he enviosioned it being used to format and describe the content of a document.

Web Sites were just collections of documents in his mind, and thus, the original nature of HTML was a procerdual way to describe text.

Nothing else.

Now, the truoble with this is that, guess what, HTML has been mutated. Nowadays, we use HTML to create beautiful ( sometimes) interactive presentations.

So, what we have is a language so fucked-up, it's next to impossible to now exactly how it's going to interact.

Imagine writing a simple "Hello World" app, that, for some reason, on machine x, said "Hello Monkey" instead.

It would drive you mad. Unfortanetly, this is exactly what HTML is. A series of essentially simple commands that can be interpertated in a dozen ways.

Of course, we have Microsoft to blame, but....

So, instead of using something MADE for display, like Postscript, we are dealing with a language primarily made for description, being used for display.

Ugly ain't it?

Back to topic:

Yes, ASP can get really hard when you start futzing with higher level programming, but, compared to PHP, it's a cakewalk.

Of course, PHP can do things ASP can only have wet dreams of doing...

In the end, it seems that server-side scripting languages are more a matter of preference then anything else, and it all depends on what platform you're aiming at.

ASP is a gateway to Visual Basic, and VBA on Wintel.

PHP can be seen as a gateway to PERL and UNIX shell scripting.

While ColdFusion is an entity in itself, using proper HTML syntax to do wicked stuff.

Pick one. You won't be wrong.


Okay, if you need to have a server side language under your belt, PHP is the way to go. Why? Cause more web hosts provide PHP support than ASP and if you can't build it, there's probably a module for it.

If you're going by levels of sheer laziness though, ASP is what you're gonna want cause even though higher data abstractions require being able to pull your eyeballs through your nose to understand them, they are a little more roundabout (the word 'redundant' floats to mind) but are more purposeful/informative to the OOP novice.

However, if you want to be able to play a movie using only still images without the aid of Flash, possibly sending it as an *.mpg email attachment to a collegue for perusal, then PHP all the way. (I didn't believe it till I saw and still have no F*CKING clue how it was done).

Regardless of these reviews, why don't you just install the ASP mod for Apache, uncomment the PHP one, download a few tuts for each, and try your hand at them? As stated in earlier posts, it does come down to a matter of preference.

Oh, and to comment on an earlier post...
I happen to love the 400+ BASIC languages out there. So what's so bad about them, Mr C-is-better-cause-I-can-typedef-without-having -to-redim? ^_^ ,V..


C sucks the same way streets in Pittsburgh suck. They were originally designed around a world with very different needs, and neither of them was prepared ahead of time to be as big and popular as they are. While C is probably far more popular than Pittsburgh, my idea holds. Back alleys squeezing between buildings dropping straight onto busy streets with no shoulder, curb, merge area, or visibility... C is still a stuctural based language.

C was designed as a toy for one guy to write his own personal programs that got way out of control. When asked why he chose half of the syntax he did, his answer was somewhere around "it was easy to type."

why is = an assignment and == a comparison? Why is something currently obscure like bitwise and labeled & and normal boolean evaluation a && ??? And really, who in their right mind before playing in this screwed up syntax actually thought of || as meaning or? What's wrong with the word or? This is just the surface. What's the difference between a struct and a class? nothing really. Why are they both there? convention and supersettism. C suffers from age and feature bloat. Everything in C is a superset of a superset of a superset. It's now a pinto with a tubbed out front end to house turbocharged v12 deisel engine originally intended for use in heavy rail.

I learned using pascal, where assignment was := so that you wouldn't get it confused with =. We pronounced it gets or becomes. It was clear. Don't get me wrong, pascal is a water gun compared to what C has become, but it was at least designed well. And supersetism is the only reason why 'if(a = b)' returns true instead of a useful "the programmer is an idiot" error. It's an assignment in a question. It's like when mom asked "Why don't you wear those brown shoes instead?" You knew it was a command not a question. But programming languages should be ordered, not ambiguous like English. Or my mother for that matter. I've lost count of the hours of life wasted to the == / = bugs.

The worst thing about java is that it adheres to some of the old C style syntax. Other than that, it's a pretty sweet language. And fairly fast too. And the best thing it has over C is a standard friggin' string library!!! I mean really! string, string.h, String.h ... C is a mess. And anyone who thinks they understand C syntax doesn't know all of C syntax. Compiler errors become meaningless because the compiler can't even guess what you're trying to do ... everything and it's brother are legal. Check out the contests on Obfuscated C. The best thing java did to C syntax was throw out 7/8ths of it. Java is pretty sweet. I still think there's something better still to come. I don't think text and coding are particularsy well suited for each other. IB is a start.

... ummm ... thanks for letting me rant. I guess I needed that. But really, C is powerful because it has low level guts and lots of stuff bolted on. In reality it is a horribly designed language and should not be classified as "modern." Neither should the Pinto. Java is decent, and follows good programming style that is largely legal in C, so for learning, java all the way.

Thanks. Hope you enjoyed the show, I'm here all week, don't forget to tip your waitress.


Simply Daemonic
YOu are welcome :p

Hey, who said HTML is difficult ?
HTML is soooo easy! Yes true that HTML was initially made to describe a document, and it still does that, it just "grew beyond its original programming" (kinda like the doctor on voyager :p). HTML is schweet but needs to have some sort of rule like "if you open a tag, close it! with a correstpinding </xx> tag!". THis is done I believe in newer versions of the HTML specifications.

Why did HTML become screwed up ? YOu say it was M$'s fault...well it was, but the question begs to be asked, why was M$ even ALLOWED to make custom tags and custom javascript ? Why as netscape allowed to make some custom tags for its navigator (like that blink tag) ? The W3C needs to be more of an enforcing body once they make the specs and not just sit there and say "oh our work is done now".

ALso they need to have some sort of certification because not all browsers are created equal that is why if you make an HTML file and view it on one browser it might look different in another.

As for C...let me just reiterate that it sucks :p I dont like this stupid language, BASIC had more class than this travesty of a language lol.



one thing you're all missing is that ASP is not a language whilst PHP is. Microsoft actually did something intelligent... ASP is a platform. giving you the possibility to write your web scripts in VB, JavaScript (ehm, JScript, sorry) or even Perl (with some module I think).

Save for the support of JavaScript, ASP is a fucked up monster.

PHP on the other hand seems to be a stupid try to give us another Perl-lookalike -- as if there weren't enought of them out there already. What was wrong with FastPerl (or whatever the embedded version of Perl was called). Do we really need another language? Especially another language with the inexplicable love for dollar-signs.

Give me a open-source web application platform with modules for different languages. ASP is crap, JSP is just Java, PHP is just stupid. Had PHP actually used 100% Perl-syntax it had been OK, but now, it's just incompatible with everything.

Just to start another topic, who would like to see a compiled version of JavaScript? I think that with a few modifications JS would be the most versatile language I have ever used, just the idea of methods as objects is wonderful (yes I know it can be done in both Java and C, but if you want type all that voodoo to do it, it's your problem).

Someone earlier in this thread talked about learning OO-languages; I can say this: Learn Java. If, then, you want to learn a language in which you can do something real (sad but true) there is a good possibility that you will be able to write good code in C++. Try it the other way around and you'll end up coding voodoo, it happens to them all, C++ coders I mean.

To me, Obj-C coders are all mad; how else can one stand the syntax of Obj-C?