Page 1 of 1

Learning how to code

Posted: Wed Jul 11, 2012 8:49 am
by william123
After booting the pi I do not know what to do. I have played around with scratch but i would like to learn how to code properly are there any good tutorials that i can use to learn how to code properly on the pi ?

Re: Learning how to code

Posted: Wed Jul 11, 2012 9:17 am
by stevepdp
I would definitely recommend checking out The Mag-Pi magazine. It features listings every month covering languages such as Scratch, Python and more recently C. If you like the listings style of learning, then I would also recommend the books in the Learn Code The Hard Way series and if you're interested in games, Invent Computer Games With Python would be a good start.

In the short time I've been programming, the one big lesson I've learned is that you need to set some goals for yourself. You need some projects.

It doesn't matter how ambitious the project is because you will simply work your way up to it piece by piece. But it's important to have an idea in mind of where you want to take your learning. Having some smaller projects in mind too also helps, as it'll give you the occasional wins which will keep you interested.

So, what do you have in mind?

Re: Learning how to code

Posted: Wed Jul 11, 2012 9:27 am
by william123
Thank you this was the exact reply I was looking for, I was thinking about creating an old fashioned game of snakes using python just to start off and get to grips with the type of code.

Re: Learning how to code

Posted: Wed Jul 11, 2012 9:50 am
by stevepdp
There's actually a package of demo code containing a terminal based Snake game which you download here.

It might look a little overwhelming at first, but try and make some small changes to it. A lot of professional programming is like this, where you work on making small changes to large projects.

Re: Learning how to code

Posted: Wed Jul 11, 2012 9:58 am
by william123
That is excellent, thank you so much for helping me :D

Re: Learning how to code

Posted: Sun Jul 15, 2012 8:13 pm
by antiloquax
Hi I have also collected a few links to some useful on-line tutorials, here.
They include some of the things mentioned by stevepdp.

Re: Learning how to code

Posted: Mon Jul 16, 2012 11:51 am
by Napier
Can't echo the sentiment more of actually having a project to work towards to help you learn. Taken me too many years to understand that.

Re: Learning how to code

Posted: Tue Jul 17, 2012 12:44 am
by jcg
Check out these wonderful books available free online:

http://mitpress.mit.edu/sicp/,
http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html.

Also, if you use the GNU Emacs `editor' (scare quotes because it is indeed much more than just an editor) there is a built-in `getting started' guide to emacs lisp. If you don't use emacs, you should :).

Also check out the MIT OCW videos that correspond with SICP:
http://ocw.mit.edu/courses/electrical-e ... ring-2005/.

Re: Learning how to code

Posted: Thu Feb 06, 2014 7:15 pm
by u6s68
I am also looking into beginner's coding. I want to adapt the game pong so that my head is the ball and to add music and maybe a start screen. Any advice?

Is there any benefit to using the Pi to code rather than a Mac or PC?

I wondered if there was perhaps offline Code Academy or Google Coder software or something?

I also want to learn web design.

Is the Pi a worthy investment for all of this?

Re: Learning how to code

Posted: Thu Feb 06, 2014 7:19 pm
by u6s68
stevepdp wrote:I would definitely recommend checking out The Mag-Pi magazine. It features listings every month covering languages such as Scratch, Python and more recently C. If you like the listings style of learning, then I would also recommend the books in the Learn Code The Hard Way series and if you're interested in games, Invent Computer Games With Python would be a good start.

In the short time I've been programming, the one big lesson I've learned is that you need to set some goals for yourself. You need some projects.

It doesn't matter how ambitious the project is because you will simply work your way up to it piece by piece. But it's important to have an idea in mind of where you want to take your learning. Having some smaller projects in mind too also helps, as it'll give you the occasional wins which will keep you interested.

So, what do you have in mind?

Can Pygames run on Android devices? Or perhaps be converted or hosted online?

Re: Learning how to code

Posted: Thu Feb 06, 2014 8:46 pm
by jamesh
u6s68 wrote:I am also looking into beginner's coding. I want to adapt the game pong so that my head is the ball and to add music and maybe a start screen. Any advice?

Is there any benefit to using the Pi to code rather than a Mac or PC?

I wondered if there was perhaps offline Code Academy or Google Coder software or something?

I also want to learn web design.

Is the Pi a worthy investment for all of this?
If you already have a PC then you can install Python on that and learn just as well as on a Pi.