Tips for learning a new programming language or library?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
The Great
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 17
Joined: Mon Nov 30, 2009 7:51 pm

Tips for learning a new programming language or library?

Post by The Great »

Does anyone have any tips for learning a new programming language or a new game programming library?
Is it a good idea to take notes on each chapter of an programming book?

Also, what would you consider to be the best API out there?
I was thinking OpenGL or SDL, but I can't make up my mind.

I have a book on DirectX, but I know that that's not multi-platform, so I don't want to learn it yet.
User avatar
Pickzell
Chaos Rift Junior
Chaos Rift Junior
Posts: 233
Joined: Sat May 16, 2009 10:21 am

Re: Tips for learning a new programming language or library?

Post by Pickzell »

One problem I have with programming books is that they're extremely wordy, which doesn't mix well with me having the attention span of a semi-retarded gnat.

What I do is try to find the most important things from each topic and write them down in a notebook, and try to make sense out of them by looking at my notes and the examples in the book. Then I try making my own programs with them.
Sorry if this is a bad answer.
I'm an altogether bad-natured Cupid.
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Tips for learning a new programming language or library?

Post by davidthefat »

What I do is just google first about the API, like how good it is, and the simplicity and some tutorials. Then I just get the API documentation and look through it, API docs are the most essential thing you can get, even before picking up books
Live-Dimension
Chaos Rift Junior
Chaos Rift Junior
Posts: 345
Joined: Tue Jan 12, 2010 7:23 pm
Favorite Gaming Platforms: PC - Windows 7
Programming Language of Choice: c++;haxe
Contact:

Re: Tips for learning a new programming language or library?

Post by Live-Dimension »

SDL is far easier, but OpenGL is faster and more powerful.

Get a book on said language, do some small games (pong, tetris, etc) and work your way up. Some of the questions you asked remind me of falco's getting started videos. Maybe you can learn something more from them.

http://www.youtube.com/watch?v=zAgpsks29W4
http://www.youtube.com/watch?v=OaxckMNq0eU
http://www.youtube.com/watch?v=3hMYF2CRFRo

Have fun!
Image
User avatar
wtetzner
Chaos Rift Regular
Chaos Rift Regular
Posts: 159
Joined: Wed Feb 18, 2009 6:43 pm
Current Project: waterbear, GBA game + editor
Favorite Gaming Platforms: Game Boy Advance
Programming Language of Choice: OCaml
Location: TX
Contact:

Re: Tips for learning a new programming language or library?

Post by wtetzner »

The Great wrote:Does anyone have any tips for learning a new programming language or a new game programming library?
Is it a good idea to take notes on each chapter of an programming book?

Also, what would you consider to be the best API out there?
I was thinking OpenGL or SDL, but I can't make up my mind.

I have a book on DirectX, but I know that that's not multi-platform, so I don't want to learn it yet.
The best way to learn a programming language or library is to have a project to do. So first use a book or tutorial of some sort to basically get up and running with a "Hello World" program. Then begin writing your project, and as soon as you don't know how to do something that you need to do in your project, figure out how to do that one thing. I think you'll learn a lot faster if the learning is motivated by a real project. You'll also be more likely to remember what you've learned, since you had to use it for something real.

So that's my advice: instead of following the order a book or tutorial takes you through a language or library, let the needs of a project guide what you learn.
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Tips for learning a new programming language or library?

Post by MrDeathNote »

wtetzner wrote:
The Great wrote:Does anyone have any tips for learning a new programming language or a new game programming library?
Is it a good idea to take notes on each chapter of an programming book?

Also, what would you consider to be the best API out there?
I was thinking OpenGL or SDL, but I can't make up my mind.

I have a book on DirectX, but I know that that's not multi-platform, so I don't want to learn it yet.
The best way to learn a programming language or library is to have a project to do. So first use a book or tutorial of some sort to basically get up and running with a "Hello World" program. Then begin writing your project, and as soon as you don't know how to do something that you need to do in your project, figure out how to do that one thing. I think you'll learn a lot faster if the learning is motivated by a real project. You'll also be more likely to remember what you've learned, since you had to use it for something real.

So that's my advice: instead of following the order a book or tutorial takes you through a language or library, let the needs of a project guide what you learn.
Gotta agree with most of what you said, i think it's a good idea to get a book aswell. Read it and then work on a project, then you will have a reference for whenever you run into problems. But your totally right programming is a "learn by doing" experience.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
SD021
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 31
Joined: Wed Oct 29, 2008 1:32 pm
Current Project: Yes :P
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: Ireland

Re: Tips for learning a new programming language or library?

Post by SD021 »

Generally I just start a project and then when I come to an obstacle I then learn how to do it, rather than learning before.

Probably not the best way but I find it the quickest for me. I usually code by day and then read up on anything I need in bed :mrgreen:
User avatar
Trask
ES Beta Backer
ES Beta Backer
Posts: 738
Joined: Wed Oct 29, 2008 8:17 pm
Current Project: Building a 2D Engine
Favorite Gaming Platforms: Sega Genesis and Xbox 360
Programming Language of Choice: C/C++
Location: Pittsburgh, PA
Contact:

Re: Tips for learning a new programming language or library?

Post by Trask »

wtetzner wrote:
The Great wrote:Does anyone have any tips for learning a new programming language or a new game programming library?
Is it a good idea to take notes on each chapter of an programming book?

Also, what would you consider to be the best API out there?
I was thinking OpenGL or SDL, but I can't make up my mind.

I have a book on DirectX, but I know that that's not multi-platform, so I don't want to learn it yet.
The best way to learn a programming language or library is to have a project to do. So first use a book or tutorial of some sort to basically get up and running with a "Hello World" program. Then begin writing your project, and as soon as you don't know how to do something that you need to do in your project, figure out how to do that one thing. I think you'll learn a lot faster if the learning is motivated by a real project. You'll also be more likely to remember what you've learned, since you had to use it for something real.

So that's my advice: instead of following the order a book or tutorial takes you through a language or library, let the needs of a project guide what you learn.
^^Fully agree and start off small... don't think you'll be remaking OOT in 2D on your first project, that's unreasonable to ask anyone. That way, since you don't know enough to define what you need to know in the project, it's easier to figure out when you reach that road block. Above all else, have fun. If you get frustrated, walk away, but come back to it. If you learn something cool and interesting, try to work with it asap so it sticks.
MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Dear god, they actually ported ES to a piece of celery!
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
User avatar
hurstshifter
ES Beta Backer
ES Beta Backer
Posts: 713
Joined: Mon Jun 08, 2009 8:33 pm
Favorite Gaming Platforms: SNES
Programming Language of Choice: C/++
Location: Boston, MA
Contact:

Re: Tips for learning a new programming language or library?

Post by hurstshifter »

My advice would be to pick one multi-purpose language, buy a great book on it, and learn it WELL. Try making as many of your own programs in that particular language as you can experimenting with different concepts and styles as you move along.

Once you find that you have become proficient in the language, you can then transition into using a library like SDL or OpenGL. Knowing your language well will make learning the API so much easier.

From that point forward if you ever want to learn an entirely different language I think you will find that it will be tremendously easier than learning the first. Syntax and style may be different from language to language but the concepts are generally the same. It is just learning how that particular language uses that that will take a bit of time.
"Time is an illusion. Lunchtime, doubly so."
http://www.thenerdnight.com
Post Reply