Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "Beginning Programming"

From eLinux.org
Jump to: navigation, search
(Created page with "This page is intended to help beginners get started with learning programming. Eventually, I'd like to provide a whole series of steps, exercises and tutorials about programmi...")
 
(Programming toolkits)
Line 5: Line 5:
  
 
== Programming toolkits ==
 
== Programming toolkits ==
* scratch - see scratch.mit.edu
+
* scratch - This is a beginning programming toolkit produced by MIT.  This has numerous examples and tutorials, and is highly recommended as an excellent starting place for beginning programmers.
 +
** Free download available from: http://scratch.mit.edu/
 +
* Kahn Academy - Excellent online introductory course for computer science and programming, using interactive javascript
 +
** [https://www.khanacademy.org/cs Computer Science tutorials and videos] - Start by clicking on the Introductory Video.
 +
** Note that the bottom area of the screen is a tabbed dialog with different areas:
 +
"Questions  Tips & Feedback  Spin-Offs  Documentation".  "Spin-Offs" has sample programs related to the tutorial, video or program you're looking at, and "Documentation" has description of different functions or statements you can use in your programs.
  
 
== Programming checklist ==
 
== Programming checklist ==

Revision as of 18:01, 29 January 2013

This page is intended to help beginners get started with learning programming. Eventually, I'd like to provide a whole series of steps, exercises and tutorials about programming, to help anyone who would like to get involved with software development or game development.

Programming toolkits

  • scratch - This is a beginning programming toolkit produced by MIT. This has numerous examples and tutorials, and is highly recommended as an excellent starting place for beginning programmers.
  • Kahn Academy - Excellent online introductory course for computer science and programming, using interactive javascript

"Questions Tips & Feedback Spin-Offs Documentation". "Spin-Offs" has sample programs related to the tutorial, video or program you're looking at, and "Documentation" has description of different functions or statements you can use in your programs.

Programming checklist

Follow these steps to learn how to program:

The very basics

  • learn what a program statement is (and what a "computer language" is)
  • learn what a variable is
  • learn what a conditional (if statement) is
  • learn what a loop is
  • learn what input is
    • different kinds of input (key press, mouse move, mouse button)
  • learn what output is
    • different kinds of output (text, image, sound)

Simple program 1: Write a program that counts how many times someone presses the space bar.

Simple program 2: Write a program that counts how many times someone presses each arrow key.

program 3: Write a program that starts counting when someone presses the space bar, and stops counting when they hit it a second time (like a stop-watch).

Program 4: Write a program that moves a ball to the right on the screen, when the right arrow is pressed.

Program 5: Write a program that starts a ball moving when key is pressed. The ball should keep moving until it hits a wall.

Note: For any of these programs, you can start with the program you used previously, and expand or modify it to do the next task. You should save it under a new name.

Program 6: Write a program that starts a ball moving in a different direction, depending on which arrow key (up, down, left, right) is pressed.

Program 7: Write a program that starts with a moving ball. When the ball hits a wall, it moves in the opposite direction.

Program 8: Combine programs 6 and 7. Write a program that starts a ball in a direction based on the key pressed. The ball should keep moving after the key is released. It should bounce off the wall and go the other direction when it hits a wall.