Thursday, March 25, 2010

Learning Programing Fast Track

I found this really cool stuff on net surfing for the web tutorials for learning programing at fast pace. If you are a starter the basic things you are going to need is to learn C, that's the basic and mother of all the language as far as we all believe. The logic in C applies everywhere. So knowing C is a great help for learning programing.

The things that you are going to need is:
  1. A computer ( I am sure you have it, you don't you can beg, buy or steal, ok don't steal until you can get by other methods)
  2. A text editor (from notepad to vim, you can use anything, here are few that you can try, those are neat enough, EditPlus, Notepad++, Vi/Vim (available for Windows too, there are video tutorial to learn vim), or another that you are comfortable with.
  3. An IDE, there are many, you don't need an IDE if you can get a compiler working for you. IDE makes your work easy. (i.e TurboC, Codeblocks, Microsoft Visual C++ and Komodo)
  4. Resources for learning programing (Books, web tutorial, videos etc...)
Ok!!! Here's something for people on fast track learning, I was looking for good programing Videos and I have found some. This web page gives access to I think very cool interesting videos, http://academicearth.org/subjects/computer-science, for those who are into programing, I think this is one good place to learn. Lectures directly from finest universities. Personally, I am watching Mehran Sahami and Richard Buckland Videos and finding them very very interesting. Richard Buckland videos are not there on this link, but I guess you can find them, they are available just ask Google. And ya, how can I forget http://www.learnerstv.com/course.php?cat=Computers Learnerstv.com . They have some good collection of videos not only on computer science but on a vast variety of subjects.

Tuesday, February 16, 2010

Learning C/C++ Introduction Contd.. Class 2 Dated 4th Feburary 2010

Assembler (Wiki Assembler): is a small program that converts assembly language to machine language.

Translator (Wiki Translator ): converts any source code to designation or machine level language.

Compiler (Wiki Compiler):
  • It compiles and checks the whole program for any error
  • Execution is fast as compare to interpreter
  • Debugging is slower as compare to interpreter
Interpreter (Wiki Interpreter):
  • It checks the program line by line and converts to machine level language if no error found
  • Execution is slow
  • Debugging is faster
Variables (Wiki Variables): It is a name/space occupies the memory where a data is to be stored and retrieved i.e. int a=5;

Constant (Wiki Constant): It is a fixed value i.e. 0-9
  • Integer constant : 0-9
  • Float constant: with decimals
  • Character constant: a, b, c
  • String constant: "Name" with multiple characters
Rules of C programing (Wiki C_syntex):

  • It's written in lower care
  • Each statement ends with semicolon (;)
  • Each statement is written in the main under compound curly brackets i.e. main {program}
Rules of naming Variables (Wiki Variables):
  • It must start with alphabet i.e. a, b, c
  • Special symbols are not allowed
  • No blank space is allowed in between
  • Only underscore (_) is allowed
  • Numerical are not allowed
Header file (Wiki Header File):

#include < stdio.h >
(stdio= Standard input output)
#include < conio.h >
(Conio= Console input output) used for displaying

printf ("Enter the first number");
scanf ("%d", & a);
printf ("%d", a)

Data Types (Wiki Data_Types): types of data used in programming

Name Sign Size
char %c 1 Byte
int %d 2 Byte
float %f 4 Byte
long int %ld 4 Byte
double fload %lf 8 Byte

Simple C program - Addition

/*-----------------------------start of program-------------------------


#include
#include

void main()
{
int a, b, c;
printf ("Enter the first number = ");
scanf ("%d", & a);

printf ("Enter the second number = ");
scanf ("%d", & b);

c=a+b;

printf ("Addition = %d", c);
getch();
}

----------------------------------end of the program--------------------*/
Now in compiler

Compile = Alt+F9
Run = Ctrl+F9
Output = Alt + F5

Comments: It is a statement which can we written anywhere in the program to understand the logical function for future use. Syntax for comment is /* Comment */ anythign in between /* and */ wont be analyzed by compiler.