LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-24-2011, 01:34 AM   #1
Nabeel
Member
 
Registered: Nov 2009
Location: Pakistan
Distribution: Ubuntu
Posts: 294

Rep: Reputation: 17
Question Learning programming


I want to learn programming. Can some one recommend a Language that is easy to learn for complete beginners.
 
Old 06-24-2011, 01:55 AM   #2
Sjonnie48
Member
 
Registered: Jun 2005
Location: Earth
Distribution: Ubuntu10.04
Posts: 308

Rep: Reputation: 43
Maybe my advice is arbitrary, but I recommend: c, c++, perl & java.
 
Old 06-24-2011, 02:24 AM   #3
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
Hi mate,

Good idea !! you'll see a whole new linux once you can program. I learnt c first and then moved onto perl and c++. C, although an advanced programming language will give you a real kick start into programming. I would recommend the book "C programming a modern approach" by King.

Im sure some other members can also recommend this book. I tried to learn C from youtube/free online documentation and did okay, but once i bought that book my progress/knowledge went through the roof !

C is a tougher than something like VB to learn, but if you learn C, you have a powerfull programming language behind you. Also, the mindset that C will give you will help you in further programming studies


Good luck and stick with it !!
Kind regards,

Last edited by 0men; 06-24-2011 at 02:27 AM.
 
Old 06-24-2011, 08:40 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I would recommend C (low-level) or Python (high-level), depending on which way you want to start.
 
Old 06-24-2011, 10:44 AM   #5
manzdagratiano
LQ Newbie
 
Registered: Mar 2011
Location: NJ, USA
Distribution: Ubuntu, Arch Linux, Debian Sid, Slackware64-current, Gentoo
Posts: 26

Rep: Reputation: 12
Like people said, C/C++ or Python is the way to go. Python's online documentation is extremely good, so you can start from the Python tutorial http://docs.python.org/tutorial/ immediately! While I was learning C++, I found the book 'Object Oriented Programming in C++' by Robert Lafore extremely useful. It makes no assumptions about whether you have any idea about programming, and walks you to very advanced concepts gradually. If you can take a look at it before you get it, I am sure you'll find it very helpful too.
 
Old 06-24-2011, 10:47 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
http://ocw.mit.edu/courses/electrica...ing-fall-2008/

Textbook is free download, and video lectures are available.
 
Old 06-24-2011, 06:33 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <PROGRAMMING> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 06-24-2011, 06:38 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
These days, I think that the best way to start learning programming is to surf ... to just look at any one of the literally thousands of sites that talk about programming so that you can "get your head around" how real programmers think ... so that you can change your mind while there's still time! There are so many other nice careers ... plumber, "greeter," basket weaver ...
 
Old 06-26-2011, 11:29 PM   #9
mf93
Member
 
Registered: Jun 2009
Distribution: Debian Squeeze, centOS
Posts: 229

Rep: Reputation: 36
It depends on what you want to do. For a practical and useful programming language, I would recommend C,C++,or Java. For a good tool for system maintenance, Bash. for something more high level but very powerful, Perl. If you want to learn more about the computer, Intel Assembly Language, and for Rich Internet Application Development, Flex or actionscript.
 
Old 07-02-2011, 12:26 PM   #10
Nabeel
Member
 
Registered: Nov 2009
Location: Pakistan
Distribution: Ubuntu
Posts: 294

Original Poster
Rep: Reputation: 17
Sorry For Posting after a week but there was too much work last week. Our summer vacations are ending and there was a heap of homework. I decided to choose C language. I went to the local book market to find "C programming a modern approach" by King, but that was not available. So I got this book called "Let Us C" by Yashavant Kanetkar. I have also Installed Eclipse as an IDE for C language which I am still looking to configure. Thanks alot for your help. I'll keep Bugging you guys, If i got a problem.


Regards
 
Old 07-02-2011, 12:44 PM   #11
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Nabeel View Post
I have also Installed Eclipse as an IDE for C language
I you're starting programming, I would stronly recommand against an IDE. It hides a lot of the details of the compilation process from you, leaving you wondering how it works and preventing you from really learning it. Instead, I would just use a plain text editor and compile from the command line. Once you get a good understanding of it, then I would move on to either manually using a build system from the command line, or an IDE.

The way it works is that each source file is compiled into an "object file" (they aren't executable yet, since they don't know where the addresses of funcions found in the other object files are), and those are then linked into an executable.

Compile and link in one step:

Code:
gcc source1.c source2.c -o executable-name
(Do NOT pass the header (.h) files to the compiler, just the source (.c) files)

Compile:

Code:
gcc -c source1.c
The above example will create a file named "source1.o".

Link:

Code:
gcc source1.o source2.o -o executable-name
 
1 members found this post helpful.
Old 07-02-2011, 03:35 PM   #12
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by MTK358 View Post
I you're starting programming, I would stronly recommand against an IDE. It hides a lot of the details of the compilation process from you, leaving you wondering how it works and preventing you from really learning it. Instead, I would just use a plain text editor and compile from the command line. Once you get a good understanding of it, then I would move on to either manually using a build system from the command line, or an IDE.
Best advice offered in this entire thread. If it is your first language you will also end up with no end of confusion between what the various language elements are, and what the IDE is/does. Start out building using shell commands, and when you've reached some degree of proficiency (you'll just know when), start building using Makefiles. It is important to understand not only the language, but the processes that occur in the transformation of source code to executable binaries (assuming you will be learning a compiled language).
If you use a scripting language (Python or Perl would be my choices there), the IDE thing is less import, and also less useful.
--- rod.
 
1 members found this post helpful.
Old 07-03-2011, 07:46 AM   #13
Nabeel
Member
 
Registered: Nov 2009
Location: Pakistan
Distribution: Ubuntu
Posts: 294

Original Poster
Rep: Reputation: 17
OK I had written my first program as per the book said. Also I have Installed the gcc compiler. Now when i gave it the command (m.cbeing the programme name)
Quote:
$ gcc m.c
THis outputs a file called a.out . What Should I do with this?????
 
Old 07-03-2011, 07:47 AM   #14
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Nabeel View Post
THis outputs a file called a.out . What Should I do with this?????
Execute it, of course!

Also, see my examples above where I used the "-o" flag to specify the name of the executable.
 
Old 07-03-2011, 07:48 AM   #15
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Nabeel View Post
OK I had written my first program as per the book said. Also I have Installed the gcc compiler. Now when i gave it the command (m.cbeing the programme name)

THis outputs a file called a.out . What Should I do with this?????
You should run it:

Code:
./a.out
.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help learning programming Fred_mike Programming 49 10-19-2010 08:52 AM
programming learning way siaswar Programming 5 09-29-2009 11:58 AM
Learning C Programming Trizon Programming 8 03-30-2007 12:37 PM
learning programming nin881 Programming 13 10-19-2005 12:17 AM
C programming learning introuble Programming 7 01-03-2005 11:55 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration