william123
Posts: 5
Joined: Wed Jul 11, 2012 8:43 am

Learning how to code

Wed Jul 11, 2012 8:49 am

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 ?

User avatar
stevepdp
Posts: 285
Joined: Fri Oct 28, 2011 7:41 am

Re: Learning how to code

Wed Jul 11, 2012 9:17 am

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?

william123
Posts: 5
Joined: Wed Jul 11, 2012 8:43 am

Re: Learning how to code

Wed Jul 11, 2012 9:27 am

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.

User avatar
stevepdp
Posts: 285
Joined: Fri Oct 28, 2011 7:41 am

Re: Learning how to code

Wed Jul 11, 2012 9:50 am

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.

william123
Posts: 5
Joined: Wed Jul 11, 2012 8:43 am

Re: Learning how to code

Wed Jul 11, 2012 9:58 am

That is excellent, thank you so much for helping me :D

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

Re: Learning how to code

Sun Jul 15, 2012 8:13 pm

Hi I have also collected a few links to some useful on-line tutorials, here.
They include some of the things mentioned by stevepdp.

Napier
Posts: 16
Joined: Sun Jul 15, 2012 7:19 pm

Re: Learning how to code

Mon Jul 16, 2012 11:51 am

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.

jcg
Posts: 25
Joined: Mon Jul 16, 2012 10:19 pm

Re: Learning how to code

Tue Jul 17, 2012 12:44 am

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/.

u6s68
Posts: 9
Joined: Wed Jan 15, 2014 9:40 pm

Re: Learning how to code

Thu Feb 06, 2014 7:15 pm

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?

u6s68
Posts: 9
Joined: Wed Jan 15, 2014 9:40 pm

Re: Learning how to code

Thu Feb 06, 2014 7:19 pm

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?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24191
Joined: Sat Jul 30, 2011 7:41 pm

Re: Learning how to code

Thu Feb 06, 2014 8:46 pm

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Return to “General programming discussion”