GPWiki.org
GPWiki.org
It is currently Wed Jun 19, 2013 3:24 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ] 
Author Message
PostPosted: Mon Mar 08, 2010 4:59 am 
what i mean is on my own what is the best way to learn the programming language (think of me as knowing completely nothing) for example a book, places with exercises on how, i dont know how to get started just learning the language.
thanks


Top
  
 
 Post subject:
PostPosted: Mon Mar 08, 2010 8:52 am 
Obfuscation Ogre
User avatar

Joined: Tue May 30, 2006 2:36 am
Posts: 325
First, I think you should choose one language to begin with. Learning both at once would just be confusing.

My recommendation would be to start with C++, since that will teach you the most up-to-date techniques, first.

C is a subset of C++, meaning that you can put C code inside a C++ program. So if you start with C, you might develop a habit of mostly doing things the C way, when choosing the C++ method first, might serve you better in the long run.
This is purely a personal preference, though, and there certainly are some really good C++ programmers that started out with C.

As for a good C++ book, that question has already been answered quite a few times in these forums. A quick search for "C++ book" returns many, many results. Here is one of them:
http://gpwiki.org/forums/viewtopic.php?t=9316

Oh, and welcome to GPWiki!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 08, 2010 10:12 am 
Shake'n'Baker

Joined: Wed Feb 24, 2010 11:47 am
Posts: 61
Location: /home/Australia
RAZZ wrote:
First, I think you should choose one language to begin with.


You should definitely decide on a language first. I recommend learning C first, because although it is a high level language it incorporates more low level elements than most HLL's. I think that this is essential because not having a reasonably good understanding for underlying hardware can cause problems and can promote bad coding practices :(.

Some links (Free software):


I can't suggest any C tutorials but a simple google search should bring up a lot ;)

PS: If you do decide to learn C having a standard library reference is very helpful.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 30, 2010 10:23 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
i recommend to skip C and start with C++.

C sucks imo (especially c89/c90), its like C++ with A LOT less features.

there's many features c++ introduced that makes programming more elegant, powerful, and fun.

it takes a while to get good at it though, but the better you get at it, the more you'll love it :D
I'm at the point now that I kindof think all programming languages suck compared to c++.
(at least the ones i have experience with... c, c#, f#, java, vb, basic)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 12:59 am 
Shake'n'Baker

Joined: Wed Feb 24, 2010 11:47 am
Posts: 61
Location: /home/Australia
IMO, low/er level languages like C and assembly give a programmer an appreciation for the underling hardware(yes I said this before ;)), I understand that this may not be practical for large projects(especially assembly), but I think that you will be a better programmer for it.

PS: If C is too difficult to learn first up(it is hard :)), maybe try another procedural based language, something like pascal or even basic would be better(NO OOP!!!).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 1:29 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
cthug wrote:
IMO, low/er level languages like C and assembly give a programmer an appreciation for the underling hardware(yes I said this before ;)), I understand that this may not be practical for large projects(especially assembly), but I think that you will be a better programmer for it.

PS: If C is too difficult to learn first up(it is hard :)), maybe try another procedural based language, something like pascal or even basic would be better(NO OOP!!!).


I am curious why you keep recommending C instead of C++.

C is just C++ without a bunch of useful features.

I'm not aware of anything useful C does that's better than C++.
And by C i mean c89/c90, i don't have experience with c99... as msvc++ doesn't support c99.

also there are some interesting features GCC lets you do with c99 like nested functions, but they're language extensions, and not part of the official standard.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 2:14 am 
Shake'n'Baker

Joined: Wed Feb 24, 2010 11:47 am
Posts: 61
Location: /home/Australia
cottonvibes wrote:
I am curious why you keep recommending C instead of C++.


C is my own personal preference, because I really dislike OOP, abstracting your code from what is really happening just doesn't work for me. Computers aren't designed to operate with objects, in C I know(generally) what code is going to be generated and what it is going to do(that's the assembly coder inside talking ;)). I think that this is key especially when learning programming. C++ is one of the better OOP languages, but IMO easier!=better.

cottonvibes wrote:
also there are some interesting features GCC lets you do with c99 like nested functions, but they're language extensions, and not part of the official standard.


Yeah nested functions are useful, but not standard unfortunately :(.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 3:27 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
cthug wrote:
cottonvibes wrote:
I am curious why you keep recommending C instead of C++.


C is my own personal preference, because I really dislike OOP, abstracting your code from what is really happening just doesn't work for me. Computers aren't designed to operate with objects, in C I know(generally) what code is going to be generated and what it is going to do(that's the assembly coder inside talking ;)). I think that this is key especially when learning programming. C++ is one of the better OOP languages, but IMO easier!=better.


i think you got the wrong idea of c++.

its not 'easier' but instead 'more powerful'.
you don't HAVE to use OOP with c++, it just has the ability to do so.

it also has references, template metaprograming, operator overloading, method overloading, etc...
many of the extra features allow you to create faster and cleaner code when used correctly.

most of my work with c++ has been mid-level, switching between high and lowlevel assembly. and i'm constantly thinking lowlevel when i code with C++.
C++ doesn't limit you from coding low-level, it instead enhances your abilities by giving you many different ways to code.

i would argue that C is very limited compared to C++, and I still haven't found out a reason why it is better.

anyways you are entitled to your opinion, but i don't see the more-low level argument as relevant since C++ can do all the low level stuff C can...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 10:30 am 
cthug wrote:
cottonvibes wrote:
I am curious why you keep recommending C instead of C++.


C is my own personal preference, because I really dislike OOP, abstracting your code from what is really happening just doesn't work for me. Computers aren't designed to operate with objects, in C I know(generally) what code is going to be generated and what it is going to do(that's the assembly coder inside talking ;)). I think that this is key especially when learning programming. C++ is one of the better OOP languages, but IMO easier!=better.

cottonvibes wrote:
also there are some interesting features GCC lets you do with c99 like nested functions, but they're language extensions, and not part of the official standard.


Yeah nested functions are useful, but not standard unfortunately :(.



Apt for this conversation, C++ is not just C with classes. Consider yourself at the first peak. :)
http://lbrandy.com/blog/2010/03/never-t ... e-knows-c/


Top
  
 
 Post subject:
PostPosted: Wed Mar 31, 2010 11:31 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
Anonymous wrote:
Apt for this conversation, C++ is not just C with classes. Consider yourself at the first peak. :)
http://lbrandy.com/blog/2010/03/never-t ... e-knows-c/


:lol


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 3:42 am 
Shake'n'Baker

Joined: Wed Feb 24, 2010 11:47 am
Posts: 61
Location: /home/Australia
cottonvibes wrote:
its not 'easier' but instead 'more powerful'.
you don't HAVE to use OOP with c++, it just has the ability to do so.

it also has references, template metaprograming, operator overloading, method overloading, etc...
many of the extra features allow you to create faster and cleaner code when used correctly.


I consider the things that you call 'more powerful', easy. There is nothing that you cannot do in C or assembly(I'm not talking about language dependant features), these features of the language just make it easier(often safer too :rolleyes). As I said before 'abstracting your code from what is really happening just doesn't work for me', but this is just my opinion(I cannot recommend something I don't like or use :)).

Anonymous wrote:
Apt for this conversation, C++ is not just C with classes. Consider yourself at the first peak. :)


I don't say I know C++, I don't like it nor use it :).

Wikipedia-C++ - 'originally named "C with Classes". It was renamed C++ in 1983.' :yeah


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 3:03 pm 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
cthug wrote:
I consider the things that you call 'more powerful', easy. There is nothing that you cannot do in C or assembly(I'm not talking about language dependant features), these features of the language just make it easier(often safer too :rolleyes). As I said before 'abstracting your code from what is really happening just doesn't work for me', but this is just my opinion(I cannot recommend something I don't like or use :)).


IMO, C is definitely the easier language to master as there's a lot less to learn.

I honestly hate C, it just can't do crap compared to C++.
Code in C ends up being very repetitive and messy because the language isn't powerful enough to write good code with.

Templates are very powerful in C++, and allow you to write many different optimized routines from just 1 function. With C you will have to to write a lot more repetitive code to do the same result.
This isn't 'harder', but just 'more annoying' and stupid.

Another example are the lack of references make you always pass pointers, and then you have to de-reference the pointers adding more code clutter... again this isn't harder, but just more annoying.

Elegant code is something I feel is very important when programming, and C doesn't let you do that.

cthug wrote:
I don't say I know C++, I don't like it nor use it :).

Wikipedia-C++ - 'originally named "C with Classes". It was renamed C++ in 1983.' :yeah


C++ has come along way from just C with Classes, which is what the article posted was saying.
When people that claim C++ is just "C with classes", its a good indication they don't know the language.

I recommend you eventually learn C++, and maybe after 2 years of coding with the language you will figure out that it really is better than C.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 3:21 pm 
Game Programming Guru

Joined: Sun Aug 15, 2004 6:20 pm
Posts: 1090
cottonvibes wrote:
I'm at the point now that I kindof think all programming languages suck compared to c++.

This is the way I feel about D.

_________________
Heard in #gpwiki: <wzl> is there some serious grammar fail in your line or am i just too intelligent for your logic


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2010 5:18 pm 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Tue Jun 13, 2006 11:51 am
Posts: 547
Location: Right here
sdw wrote:
cottonvibes wrote:
I'm at the point now that I kindof think all programming languages suck compared to c++.

This is the way I feel about D.


Yeh I know a few people that love D.

I haven't used it myself, but from reading about it, I know it lacks support for macro definitions.

Lack of support for macros is something that will keep me from liking the language.
They claim you can do almost everything w/o macros, but that's not true.

Its true that its easy for macros to be overly used and abused, but I still like the possibility to use them.

Also D is not as popular and established as C++, so that's currently a big negative.
The standard compiler is DMD, and I wonder how optimized the code it generates is compared to the more established msvc++.
It does have a lot of nice features though from what I read.

Anyways I can understand why people like it so much, but at least currently its too-new for me to switch over to it.
Most-likely I will try the language out in a few years though when its more established.
Till then, I'm still in the process of mastering C++. Although I know a lot of what the language can and can't do, there are still many useful tricks and features that I'm introduced to every-so-often that I love learning.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2010 10:13 am 
Shake'n'Baker

Joined: Wed Feb 24, 2010 11:47 am
Posts: 61
Location: /home/Australia
cottonvibes wrote:
IMO, C is definitely the easier language to master as there's a lot less to learn.

Templates are very powerful in C++, and allow you to write many different optimized routines from just 1 function. With C you will have to to write a lot more repetitive code to do the same result.


Well there is a lot less to learn, language wise but the bluk features of the language make the coding easier and IMO obfuscate what is really happening. Yes things like templates and stuff can ease coding but is something I am willing to live without :)(Other things like Overloading of methods and operators I would never use :x).

cottonvibes wrote:
This isn't 'harder', but just 'more annoying' and stupid.


To some, others like me find it more 'realistic' ;).

cottonvibes wrote:
C++ has come along way from just C with Classes, which is what the article posted was saying.
When people that claim C++ is just "C with classes", its a good indication they don't know the language.


I was just joking about C with classes :P

cottonvibes wrote:
I recommend you eventually learn C++, and maybe after 2 years of coding with the language you will figure out that it really is better than C.


I can not say I will never use C++, but I am not going to learn it just to see if I like it(especially 2 years :lol). I'm happy doing what I'm doing, I don't intend to get in the business, so I can do and think what I like :).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 05, 2010 7:17 am 
Technomaniac

Joined: Sun Dec 05, 2004 11:27 am
Posts: 3249
Location: Sydney, Australia
C has some nice properties that C++ doesn't have, mostly around the interop side of things, for example you can sanely export symbols.

The simplicity of C has its benefits too (I'm aware of the downsides... especially the lack of templates is a pain), but reasoning about C code (e.g. "what will be executed when the pc gets here?") is way easier. This does only tend to be an issue when you are debugging... but I do tend to spend a lot of time debugging rather than writing stuff, so it seems like a sensible trade-off.

Oh, and C99 is quite nice too, you should try it sometime...

_________________
Trying is the first step towards failure
b


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 1:25 pm 
Not sure why this is even up for debate. Learn C++ and you're learning C at the same time. You're just learning to write much more logical, manageable and extensible programs is all.


Top
  
 
 Post subject: Hello,
PostPosted: Mon May 10, 2010 11:12 am 
Rookie

Joined: Mon May 10, 2010 11:09 am
Posts: 2
A C++ tutorial and a C tutorial, OpenGL with C++ tutorials, C++ Standard Template Library (STL) tutorials, articles on both the C and C++ programming languages and computer science, as well as Denthor of Asphyxia's graphics tutorials converted to C++ (mainly C code). Please email me with corrections or submissions to this page.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 13, 2010 6:00 am 
Bit Baby
User avatar

Joined: Thu Apr 01, 2010 5:39 am
Posts: 8
Here's a big series of C++ Video Tutorials. If you like learning from books, I reccommend C++ Primer Plus.

_________________
I'm learning C++ and Java at BCIT. Also, trying to make a 2D game with C++ and SDL.


Top
 Profile  
 
PostPosted: Tue Feb 05, 2013 10:46 pm 
Rookie

Joined: Tue Feb 05, 2013 10:44 pm
Posts: 1
here is another good c reference http://code-reference.com/c there a a lot of examples


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

All times are UTC


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

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group