By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - Gaming - Can I learn rudimentary programming from a book?

If you are interested in business programming, any of the object oriented languages would be fine(C++, Java, even Visual Basic). If you are interested in embedded development or game programming you should start with C.

If you are truly interested in learning to program, you should probably start with a book of algorithms such as this one, http://books.google.com/books?id=NLngYyWFl_YC&pg=PA15&dq=introduction+to+algorithms&psp=1&sig=jX-xfEDWJU3PprUwH8Qfxidli6M#PPP1,M1. If you can read this book and still have a desire to program, then learning the individual languages will be a lot easier.





Thanks for the input, Jeff.

 

 

Around the Network
Rpruett said:
I would start with C++. C is too cryptic in many ways and can be a hassle. Java is to abstracted from the actual machine IMO.

C++ will give you an easy introduction and understanding into what you're doing. As you grow with C++, you will be able to handle Java or most of what you want with relative ease.

That doesn't make sense. As other posters have said, C is essentially a subset of C++.  If you know C++ you know C too.

 



My Mario Kart Wii friend code: 2707-1866-0957

if you are Kintaro Oe you can even learn without pc - cardboard imitation will be enough.



NJ5 said:
Rpruett said:
I would start with C++. C is too cryptic in many ways and can be a hassle. Java is to abstracted from the actual machine IMO.

C++ will give you an easy introduction and understanding into what you're doing. As you grow with C++, you will be able to handle Java or most of what you want with relative ease.

That doesn't make sense. As other posters have said, C is essentially a subset of C++.  If you know C++ you know C too.

 

Many c++ programers actually program in C.  As someone mentioned earlier, object oriented programming is a great way to create self-documenting code, but it really is a waste of resources.

 

"(Lie #2) Code should be designed around a model of the world

There is no value in code being some kind of model or map of an imaginary world. I don't know why this one is so compelling for some programmers, but it is extremely popular. If there's a rocket in the game, rest assured that there is a "Rocket" class (Assuming the code is C++) which contains data for exactly one rocket and does rockety stuff. With no regard at all for what data tranformation is really being done, or for the layout of the data. Or for that matter, without the basic understanding that where there's one thing, there's probably more than one.

Though there are a lot of performance penalties for this kind of design, the most significant one is that it doesn't scale. At all. One hundred rockets costs one hundred times as much as one rocket. And it's extremely likely it costs even more than that! Even to a non-programmer, that shouldn't make any sense. Economy of scale. If you have more of something, it should get cheaper, not more expensive. And the way to do that is to design the data properly and group things by similar transformations."

-- http://www.insomniacgames.com/tech/articles/0308/three_big_lies.php



Thanks for the input, Jeff.

 

 

@dbot: I agree, but that's something which can be done no matter what the language. C++ doesn't force you to use OOP strictly like that, it gives you a lot of freedom.



My Mario Kart Wii friend code: 2707-1866-0957

Around the Network
786_ali said:
Words Of Wisdom said:

I recommend going and taking a very cold shower every time you have the urge to learn to program.

Repeat until said urges go away.

If there was nobody who knew programming then there would be no internet and no computers or tv's or for that matter, virtually no electronics.

 

Uhm, to tell the truth tv predates computers, as do most electronic elements.



"All you need in life is ignorance and confidence; then success is sure." - Mark Twain

"..." - Gordon Freeman

if you are going to start programing go for a RAD tool, otherwise you wont see any meaningful results, c and c++ are middle level languages, so to see results with it you will get very confused at first since the IDE and libraries will do everything for you, they do a LOT. Try java or C# first, those are hight level languages that are easy to learn, the IDE and libraries will still do things for you but not as much as with c and c++, so you will be able to understand.

A book with put you in course to learn, but will not teach anything important at first, i find more useful downloading commented code from the internet and seen the explanations, but first you need to read a book about the basics to do that.



dd if = /dev/brain | tail -f | grep games | nc -lnvvp 80

Hey Listen!

https://archive.org/details/kohina_radio_music_collection

NJ5 said:
Rpruett said:
I would start with C++. C is too cryptic in many ways and can be a hassle. Java is to abstracted from the actual machine IMO.

C++ will give you an easy introduction and understanding into what you're doing. As you grow with C++, you will be able to handle Java or most of what you want with relative ease.

That doesn't make sense. As other posters have said, C is essentially a subset of C++.  If you know C++ you know C too.

 

Something as simple as text output to the screen can be a lot more intimidating to a beginner.  In general,  yes if you know C++ you will know C too and if you have any level of experience the transformation shouldn't be very difficult at all.   Although for someone reading a book to try and learn?  Remember we are talking about someone who is essentially a blank slate.  Reading the preface of a programming book.



NJ5 said:
Rpruett said:
I would start with C++. C is too cryptic in many ways and can be a hassle. Java is to abstracted from the actual machine IMO.

C++ will give you an easy introduction and understanding into what you're doing. As you grow with C++, you will be able to handle Java or most of what you want with relative ease.

That doesn't make sense. As other posters have said, C is essentially a subset of C++.  If you know C++ you know C too.

 

It is wrong to say C is a subset of C++, it si a preceding language not a subset, compailers compile c for backwards compatibility reasons not because they are the same, c is not object oriented , structures are suppoerted and there are ways to implement anything c++ has in c, but c++ has it as an standard, c is faster and more compacted.

Is not true that if you know C++ you know C too, because you need some work arounds to make C work like C++(at an advance state) that are not convetional.

 



dd if = /dev/brain | tail -f | grep games | nc -lnvvp 80

Hey Listen!

https://archive.org/details/kohina_radio_music_collection

radha said:
NJ5 said:
Rpruett said:
I would start with C++. C is too cryptic in many ways and can be a hassle. Java is to abstracted from the actual machine IMO.

C++ will give you an easy introduction and understanding into what you're doing. As you grow with C++, you will be able to handle Java or most of what you want with relative ease.

That doesn't make sense. As other posters have said, C is essentially a subset of C++.  If you know C++ you know C too.

 

It is wrong to say C is a subset of C++, it si a preceding language not a subset, compailers compile c for backwards compatibility reasons not because they are the same, c is not object oriented , structures are suppoerted and there are ways to implement anything c++ has in c, but c++ has it as an standard, c is faster and more compacted.

Is not true that if you know C++ you know C too, because you need some work arounds to make C work like C++ that are not convetional.

 

I said essentially a subset. There are very few things which work in C but not C++, and they're all small details which can be converted in one second. Those differences are not relevant for this thread, they're slight nitpicks as you can read here:

http://www.research.att.com/~bs/bs_faq.html#C-is-subset

Thus, C++ is as much a superset of ANSI C as ANSI C is a superset of K&R C and much as ISO C++ is a superset of C++ as it existed in 1985. Well written C tends to be legal C++ also.

You mentioned structures. C's structures are also supported in C++, in fact a class is just a souped-up structure which allows to use the public/private/protected keywords.

You mentioned speed. C++ is not slower than C with equal code, only if you use a slower C++ feature (which you aren't forced to).

 



My Mario Kart Wii friend code: 2707-1866-0957