LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2013, 08:11 AM   #1
greytux
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
Programming Language


Hi I'm from Australia and would like to know the best language ( for Linux as a newbie like me ) to learn.
All help would be great.


Thank you
 
Old 05-05-2013, 08:21 AM   #2
IamaHack
LQ Newbie
 
Registered: May 2012
Distribution: Currently doing embedded linux so.... Buildroot? ;-)
Posts: 8

Rep: Reputation: Disabled
Greytux, wars have been fought over less. Almost any answer that someone gives you would be opposed by some one else. That said, I would suggest learning the C language if you have any interest in developing Linux drivers or kernel features, since that is the only language that can be used for kernel development.
 
Old 05-05-2013, 08:34 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by greytux View Post
Hi I'm from Australia and would like to know the best language ( for Linux as a newbie like me ) to learn.
Just a newbie at Linux or at programming as well?

C++ is the best language for almost all purposes. (Obviously, many people here will disagree).

Quote:
Originally Posted by IamaHack View Post
I would suggest learning the C language if you have any interest in developing Linux drivers or kernel features, since that is the only language that can be used for kernel development.
Very few programmers ever work on drivers or the kernel in Linux. Neither a Linux newbie nor a programming newbie should be aiming at those as a direct goal. After you are experienced in both programming and Linux, you might want to learn how to code Linux drivers or parts of its kernel.

Many people suggest learning C before learning C++. I don't think that is a good idea. I/O and strings and containers in C++ are important features for beginning programming and are much easier to learn in C++ than the corresponding features in C. So I think it is best to start with a practical subset of C++ that includes those features. As you progress from beginner to intermediate in C++, you would naturally learn almost everything you would need to program in C. If at that point, you were interested in Linux kernel programming, learning more advanced C instead of more advanced C++, would be an easy next step. I think you can get to advanced C programming more easily through beginner C++ programming than through beginner C programming.
If the next step after intermediate C++ is big complicated projects, then one would stick with C++ and learn more of it.

Quote:
Originally Posted by IamaHack View Post
Almost any answer that someone gives you would be opposed by some one else..
I'll oppose the word "almost" in that claim.

Another language I would suggest is bash. If you want to really learn Linux, you need to understand that bash is used as a programming language, not just as a command language. If you want to really learn Linux, bash may be the most important programming language to learn. Probably the biggest reason I haven't become a Linux expert myself is lack of patience for learning bash. When used as a programming language, it is a painfully awkward programming language. But it is heavily used as a programming language in Linux. Understanding Linux requires getting a lot of information that is not really documented and can only be learned by understanding various bash programs.

Obviously, far more of the full system is written in C, rather than in bash. But far more of the C functionality is documented well enough that you can be expert in using it without ever looking at the source code. The bash portions differ more from distribution to distribution and are less well documented, and Linux experts depend more on understanding the bash source code than on understanding the C source code.

Last edited by johnsfine; 05-05-2013 at 09:00 AM.
 
1 members found this post helpful.
Old 05-05-2013, 08:39 AM   #4
IamaHack
LQ Newbie
 
Registered: May 2012
Distribution: Currently doing embedded linux so.... Buildroot? ;-)
Posts: 8

Rep: Reputation: Disabled
See what I mean? ;-)

I use C++ for application development and C for kernel development, and have used Java, Perl, Bash and assembly where I had to or where it was appropriate. You almost have to learn some kind of shell scripting when developing for Linux.

Last edited by IamaHack; 05-05-2013 at 08:44 AM.
 
Old 05-05-2013, 09:01 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Hi I'm from Australia
G'day maite.
Quote:
[I] would like to know the best language
It's a bit like asking "I'd like to know the best tool". A spanner is a good tool but you wouldn't use it to saw a plank in half. Tell us what you're interested in doing and then let the suggestions flow.
jdk
 
Old 05-05-2013, 09:10 AM   #6
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by jdkaye View Post
"I'd like to know the best tool".
A vice-grip, of course. There is a correct tool for every job, and when you can't find it, you use a vice-grip instead. (I didn't like using a vice grip to cut a plank in half, but I've done it.)

C++ is much more general purpose than vice-grips. There are lots of specialized tasks in scripting or networking or text manipulation in which some other language is better. But that ignores the cost of learning and remembering all those other languages. If you know C++, it is pretty good for almost any programming task. No other language has near that range.

Last edited by johnsfine; 05-05-2013 at 09:11 AM.
 
Old 05-05-2013, 09:24 AM   #7
mohscorpion
LQ Newbie
 
Registered: Apr 2013
Posts: 11

Rep: Reputation: Disabled
i guess first you should focus on your goals .
for low level coding and direct access to os and hardware mostly c and c++ are used ( a little higher level than assembly and also mostly cross platform ).
for high level without GUI or simple guis , there are lots of languages for applications and web application like TCL , Perl , Python , Ruby and so on.
if you like very new approaches which are cross platform and also nice gui , you can consider JAVA and MONO ( .net ) .
also i have to strongly agree with johnsfine , bash is more than command script and is heavily and smartly used for programming and is very good for understanding linux .
the bottom line is : there is no absolute best language each one has it's own pluses and minuses . even for specific applications , weak points in a language can become a plus point and vice versa.

Last edited by mohscorpion; 05-05-2013 at 09:26 AM. Reason: typo
 
Old 05-05-2013, 09:25 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
@johnsfine YMMV. I wouldn't recommend C++ for any job involving pattern matching.
jdk
 
Old 05-05-2013, 09:29 AM   #9
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,137

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Learning C as a first language may be a bit like learning to swim by jumping off a cliff! Python is quite easy and very versatile: a lot of the configuration tools in Linux distros are written in it: see the Wikipedia article for details.
 
Old 05-05-2013, 09:54 AM   #10
flshope
Member
 
Registered: Jul 2009
Location: Tennessee (United States)
Distribution: Debian 11.6, Ubuntu 22.04.2, 18.04.6, Android 11
Posts: 236
Blog Entries: 44

Rep: Reputation: 80
The "best" language depends heavily on your application. I got into programming by learning Basic. My interest was scientific programming, and I quickly got into Fortran. I have considered C and took some courses, but that language struck me as too undisciplined (maybe I should say "too flexible") for scientific applications, where you have a lot more to worry about than just programming (like getting the physics and numerical methods right).
 
Old 05-05-2013, 03:03 PM   #11
mohscorpion
LQ Newbie
 
Registered: Apr 2013
Posts: 11

Rep: Reputation: Disabled
i forgot to say , PURE Basic is also a good choice based on your needs . it is cross platform ( even executable on mac ) , high performance and advanced graphics support.
 
  


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
linux programming employable programming language emekadavid Linux - General 8 09-21-2012 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:52 AM.

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