Programming

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
Post Reply
brownelltyler
Greenhorn
Posts: 9
Joined: 12 Aug 2007, 15:50

Programming

Post by brownelltyler »

Hey guys. All of the code for this game is written in C, right? Well, I'd like to learn it. Can you offer some good resources, as well as any programs that you use to write and compile your code? For example, do you use MS Visual Studio? I'm clueless when it comes to C/C++.

I've been wanting to learn it for a while, I just haven't had any time until now.

I have a good understanding of some web languages, such as PHP, Javascript, VB.NET, but I've never programmed anything offline.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Programming

Post by Kamaze »

To be honest, it would take >= 1 year until you would be able to understand, and have the required practice/experience in C, to bring the hands in this source code or any other "big" C projects. If you aren't a real programming crack.
We all have the same heaven, but not the same horizon.
brownelltyler
Greenhorn
Posts: 9
Joined: 12 Aug 2007, 15:50

Re: Programming

Post by brownelltyler »

I'm aware. Still, I have to start somewhere, right?
Sorry about posting in the wrong topic.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Programming

Post by Kamaze »

I would suggest to learn C++ instead of plain C.
Since C is still a subset of C++ and it should be easier to think "downwards" (sorry dear C assertors :))
from C++ to C instead of going the other way around later.

Also, there should be some more resources and beginner tutorials about C++ than C.
And the most C++ tutorials begin with basic C stuff.

* http://www.mindview.net/Books/TICPP/Thi ... CPP2e.html
* http://www.parashift.com/c++-faq-lite/
* http://www.cppreference.com/
* http://cplusplus.com/reference/
* ...
We all have the same heaven, but not the same horizon.
brownelltyler
Greenhorn
Posts: 9
Joined: 12 Aug 2007, 15:50

Re: Programming

Post by brownelltyler »

Very good point, C++ it is!
Thanks for the resources.
What programs do you use/recommend for development? Just something like Notepad++?
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Programming

Post by Kamaze »

Code::Blocks (cross platform, supports many compilers) -> http://www.codeblocks.org/
Eclipse with CDT Plugin (Only with GCC/MinGW compiler) -> http://www.eclipse.org/cdt/
Vistual C++ Express (Windows only) -> http://www.microsoft.com/express/vc/
...
Last edited by Kamaze on 24 Apr 2008, 23:12, edited 1 time in total.
We all have the same heaven, but not the same horizon.
qwerty800
Trained
Trained
Posts: 183
Joined: 07 Mar 2008, 21:23

Re: Programming

Post by qwerty800 »

I think Code::Blocks is an excelent free tool (Free like a free speech, not like a free beer.)
~~If someone asks you to sudo rm -rf anything don't do it.~~
Image
Image
[url=http://youtube.com/watch?v=ks-N4rI_1RU&feature=related]
This Guy for PRESID
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Programming

Post by DevUrandom »

Sorry in advance...
Kamaze wrote: To be honest, it would take >= 1 year until you would be able to understand, and have the required practice/experience in C, to bring the hands in this source code or any other "big" C projects. If you aren't a real programming crack.
I doubt this. Looking at other people's code is not that bad to learn stuff (just like you learn to read novels before you write them). Just make sure you stay away from hci.c. :P
And fixing small bugs or adding small features is not *that* difficult either. (After you finished "Hello World" successfully. ;) )
Kamaze wrote: I would suggest to learn C++ instead of plain C.
Since C is still a subset of C++ and it should be easier to think "downwards" (sorry dear C assertors :))
from C++ to C instead of going the other way around later.
I think this is plain wrong. Programming in C is way different from programming in C++.
It's not for fun that there are books "C for C++ programmers" and the other way round. And there also must be a reason why all books on the topic which I read till now recommend not to do this. (I.e. assume when you know one language, it would be easier to learn the other.)
Kamaze wrote: Also, there should be some more resources and beginner tutorials about C++ than C.
And the most C++ tutorials begin with basic C stuff.
Given the fact that C is way older than C++, it would be surprising if there is really less documentation on it.
Though I currently cannot prove you wrong. ;)

For our german readers I would recommend "Programmieren lernen mit C" by Karlheinz Zeiner, ISBN 3-446-21596-4. That's the one I learned C with (before I learned C++), and I remember it as a very good book. Though maybe Kreuvf wants to share a review with us in his blog? ;)
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Programming

Post by kage »

heh... C probably may well have less documentation... but then again, you can actually remember the entire C language spec at once. C++ is something of a monster, imo, and in many ways, even when i didn't know what C was like, when learning C++ i tended to drift towards the simpler C syntax (i even was wondering why people would go with classes when they had perfectly good structs available -- so long as they didn't step on their own toes).

if you want to learn C++, you're going to have to learn 60% of C anyways, and i would argue that because C is easier to mess up in easy to debug ways (and C++ is easier to mess up in 'look on page 187 of the textbook' ways), not to mention that you learn to write slimmer code that works just as well on half the hardware, i would personally recommend C over C++ as the beginning language (if not even assembly).  As a friend once told me, you'll never be an especially effective programmer if you don't know the limitations of the hardware you're running on, and C keeps you more cosy with your hardware.
Chojun
Regular
Regular
Posts: 518
Joined: 25 Nov 2006, 17:49
Contact:

Re: Programming

Post by Chojun »

Get This Book.

Technically it's a textbook (so it's fairly expensive) but it's well worth it if you are serious about programming in the professional world.  (The 5th and 4th editions are also really good...  I have the 4th edition).

Don't bother with C unless you plan to develop for embedded or operating systems.  Period.

Learning C++ will put you in a good position to learn other languages such as Java or C#, which are in demand today.  Learning C++ will also give you enough knowledge to feel comfortable in the code.
The best thing to do when your philosophies don't stand up to debate is to lock the thread and claim victory.
qwerty800
Trained
Trained
Posts: 183
Joined: 07 Mar 2008, 21:23

Re: Programming

Post by qwerty800 »

As I remember, the site Newbies Paradise give C/C++ tutorials...
Or maybe it was it's french version?
Aw, crap... I forgot.
~~If someone asks you to sudo rm -rf anything don't do it.~~
Image
Image
[url=http://youtube.com/watch?v=ks-N4rI_1RU&feature=related]
This Guy for PRESID
Post Reply