LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 06-24-2011, 01:34 AM   #1
Nabeel
Member
 
Registered: Nov 2009
Location: Pakistan
Distribution: Ubuntu
Posts: 223

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: Gold Coast, Australia
Distribution: peppermint, slackware, freeBSD
Posts: 160

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
Distribution: Arch x86_64
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707
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
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 2,757

Rep: Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767
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: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
Blog Entries: 10

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
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
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,685

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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: 223

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
Distribution: Arch x86_64
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707
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
Senior Member
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 4,506

Rep: Reputation: 602Reputation: 602Reputation: 602Reputation: 602Reputation: 602Reputation: 602
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: 223

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
Distribution: Arch x86_64
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707Reputation: 707
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,123

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 04:49 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration