Programming Tutorial

Started by
7 comments, last by Alisa 11 years, 6 months ago
Hi friends,

I would like to ask you, how can i learn the basics of computer programming?
Is there some video tutorial, or something like that??
If Yes then Please share with me.
Advertisement
Moving thread to For Beginners.
Khan Academy has a few introductory videos:

http://www.khanacademy.org/cs/tutorials/programming-basics
Python 3 tutorial series:

http://www.youtube.com/playlist?list=PLDFB7FFF90EE6F0C1

+---------------------------------------------------------------------+

| Game Dev video tutorials -> http://www.youtube.com/goranmilovano | +---------------------------------------------------------------------+
This should answer your questions: http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx

I personally use C# with SharpDX, because I´m not sure about the future of XNA.
But you could use Unity3D with C#: http://unity3d.com/

C++ has Ogre3D, Allegro, SFML, ... as far as i know

If you know your language well, you should start writing 2D games like Pong, Space Invaders, ...
Don´t rush to 3D and don´t think about programming a (m)morpg. This are some hard tasks wich need experience.

Know your goal, and get to it.
If your completely new to programming then I highly recommend python. Its about as simple as programming gets (short of visual tools anyway) while being a very powerful language at the same time. The skills you learn in python will then apply to other languages. Someone has already posted a python 3 video tutorial. Each generation of python is ever so slightly different. 2 is still remarkably common, 3 is relatively new but all the best tutorials are for 3. 2 is slowly being phased out. If you find the tutorials that suit you best are for 2 then use 2 but otherwise you might aswell use 3, just make sure on the python website you download the correct version for your tutorial (I believe that would be either 2.7 for python 2 or 3.1 for python 3). One python tutorial thats meant to be pretty good can be found here: http://inventwithpython.com/chapters/ (python 3)

C# and java are often recommended too. These are also excellent choices although harder than python (I happen to know both python and C#, have not used java although I hear java and C# are very similar in syntax and difficulty).

For comparison here is the same program written in python 3 and in C# 4.

Python

[source lang="python"]import random
import time

def displayIntro():
print('You are in a land full of dragons. In front of you,')
print('you see two caves. In one cave, the dragon is friendly')
print('and will share his treasure with you. The other dragon')
print('is greedy and hungry, and will eat you on sight.')
print()

def chooseCave():
cave = ''
while cave != '1' and cave != '2':
print('Which cave will you go into? (1 or 2)')
cave = input()

return cave

def checkCave(chosenCave):
print('You approach the cave...')
time.sleep(2)
print('It is dark and spooky...')
time.sleep(2)
print('A large dragon jumps out in front of you! He opens his jaws and...')
print()
time.sleep(2)

friendlyCave = random.randint(1, 2)

if chosenCave == str(friendlyCave):
print('Gives you his treasure!')
else:
print('Gobbles you down in one bite!')

playAgain = 'yes'
while playAgain == 'yes' or playAgain == 'y':

displayIntro()

caveNumber = chooseCave()

checkCave(caveNumber)

print('Do you want to play again? (yes or no)')
playAgain = input()
[/source]

C#

[source lang="csharp"]using System;
using System.Collections.Generic;
using System.Text;

namespace DragonRealm
{
class Functions
{

}

class Program
{
static void displayIntro()
{
Console.WriteLine("You are in a land full of dragons. In front of you,");
Console.WriteLine("you see two caves. In one cave, the dragon is friendly");
Console.WriteLine("and will share his treasure with you. The other dragon");
Console.WriteLine("is greedy and hungry, and will eat you on sight.");
Console.WriteLine();
}

static string chooseCave()
{
string cave = "";
while ((cave != "1") & (cave != "2"))
{
Console.WriteLine("Which cave will you go into? (1 or 2)");
cave = Console.ReadLine();
}
return cave;
}

static void checkCave(string chosenCave)
{
Console.WriteLine("You approach the cave...");
Console.WriteLine("");
System.Threading.Thread.Sleep(800);
Console.WriteLine("It is dark and spooky...");
Console.WriteLine("");
System.Threading.Thread.Sleep(800);
Console.WriteLine("A large dragon jumps out infront of you! He opens his jaws and...");
Console.WriteLine("");
System.Threading.Thread.Sleep(1200);

Random random = new Random();
string friendlyCave = random.Next(1, 3).ToString();

if (chosenCave == friendlyCave)
{
Console.WriteLine("Gives you his treasure!");
}
else
{
Console.WriteLine("Gobbles you down in one bite!");
}
}

static void Main(string[] args)
{
string playAgain = "yes";
while (playAgain == "yes")
{
Console.Clear();
displayIntro();
string CaveNumber = chooseCave();
checkCave(CaveNumber);

Console.WriteLine("Do you want to play again? (yes or no)");

playAgain = Console.ReadLine();
}
}
}
}
[/source]
You can see for yourself which of the 2 is simpler to follow. I do have to say, that program could be simplified for a beginner a little further (in which case they begin to look a little more similar). The original python code I found here: http://inventwithpyt...m/chapter6.html I then ported it to C# myself a few days ago in order to practice my C# skills.

I do not recommend learning an un-managed language first. C++ is an excellent example of an un-managed language. Later on then C++ is probably the best language but its also one of the hardest to work with and immense for a newcomer. Not impossible for a newbie but no offense you haven't googled for a programming tutorial yourself yet so I doubt you have the patience to learn C++.


EDIT:
Jesus christ the forum's code tag does not work well, but then it does say experimental I guess.

Use this: http://www.codecademy.com

It's similar to Khan Academy but it's not just videos, it's interacting and using codes also. There you can learn Javascript, Python, Ruby, and more. It's very beginner friendly so don't be afraid of trying it out.

Make sure to create an account to track your progress
If you haven't decided on the languages yet. I'd also recommend Python and C# for the starters. If you're planning to take a university course in the near future, you may expect that they will teach you Java (hopefully - some schools start from C - which is a great language but not the easiest to master).

As for the complete guide for beginners, I'd highly recommend this book. I used it myself to learn Python and I must say, that the book is well organized and straight to the point.

Khan Academy has a few introductory videos:

http://www.khanacade...gramming-basics



I visit to this link ..... This link is too Good...
Thanks for sharing this link ..

smile.png smile.png smile.png smile.png

This topic is closed to new replies.

Advertisement