LinuxQuestions.org
Help answer threads with 0 replies.
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 11-24-2006, 01:10 AM   #1
gimmee
Member
 
Registered: Jul 2006
Location: New Zealand
Distribution: Fedora 17 64bit (Desktop) Fedora 15 (Laptop)
Posts: 98

Rep: Reputation: 17
Talking What programming language, languages to learn for linux.


Hi all

I want to learn programming in linux so am just trying to get an idea on what languages I should learn.

I have been looking around and are absolutely confused if i should learn C or C+ or both.

Python
Perl
Ruby
Tcl
KDE
Gnome
GTK
Java
Scripting
Shell

I dont know where these guys get the time to learn all these languages to a reasonable degree.

To get the most out of the linux world and eventually contribute back what would be the main languages I should learn, especially since I already get hassled for spending toooo much time on the computer.

Look forward to any replies

Cheers

Gimmee

Last edited by gimmee; 11-24-2006 at 01:12 AM.
 
Old 11-24-2006, 02:16 AM   #2
tmick
Member
 
Registered: Jun 2005
Location: North Dakota
Distribution: Debian Testing
Posts: 247

Rep: Reputation: 20
I am no programming guru but let me see if this helps any.

Linux is based on the Posix standard, therefore it's an offshoot of Unix. Why that should mean anything to you is because Unix was created with the 'C' programming language and uses Pearl for it's primary scripting language. I think if you read "Sam's teach yourself Unix in 24 hours" you'll get a better understanding of what I mean.

Linux (as far as I know) is written in C++, but has many programs that are from Unix originally. So keep a reference on "C" handy and learning C++ would be a good thing.

Also KDE and Gnome are desktops not programming languages.
GTK is a programming standard, more or less, and information on it can be found at http://en.wikipedia.org/wiki/GTK+

Python, Perl, Tcl,and Ruby are scripting languages.

The Shell is your command line, yes there are different types of shells, but in general the shell is the Command line interface.

Java is a good language to learn, just because of its ability to run on many operating systems without recompiling.

In the interest of keeping this a reasonably short reply, search the web for tutorials on one language and try it. Some poeple loathe C++ but love Java, and vice versa.
 
Old 11-24-2006, 02:26 AM   #3
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 33
People please do not start with the "My favorite language is X". You will know the language you like when you find it. Until then, I suggest to tutorial briefly on many languages.
 
1 members found this post helpful.
Old 11-24-2006, 06:50 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by tmick
Linux (as far as I know) is written in C++
No, that's not the case. In fact C++ is even banned from Linux. (note: this is only about the kernel of course).
 
1 members found this post helpful.
Old 11-24-2006, 09:28 AM   #5
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 43
If you want to be able to troubleshoot, bugfix, and add on to a typical linux setup, you probably want to know these things (eventually):

The kernel is written in C, and tons of apps and common libraries are C or C++. Since C++ is a superset of C, you will effectively learn C before you learn C++ no matter what. Thus, you probably want to know C. Not knowing C++ will only really hurt if you want to do KDE or QT things.

You will want to know at least one scripting language like Perl, Python, or Ruby for small-medium projects. There is probably more existing code in Perl than anything else, but the language may be starting to age poorly.

You will definitely want to know a passable amount of bourne shell (sh, bash), but you don't need to be an expert at it. This is useful for writing small gadgets for yourself and for dealing with your system's existing scripts.

For GUI toolkits, your main choices are Gnome/GTK and KDE/Qt. The main difference is that Gnome and GTK are C, KDE and Qt are C++. They are both respectable. Both GTK and Qt have bindings to other languages like perl, python, and ruby. GTK has a C++ wrapper, but you can't use Qt from C.


Java is a decent language and can save you some time over C/C++ for building medium-large projects. The downside is that there's not a ton of existing Java code on linux so you have to do extra work when you want to interface with anything else.

Tools you'll want to know about:

gcc, gdb for C/C++

make

grep

A text editor: start with an easy GUI one like kate, but learn emacs or vim eventually.

apache web server

Your distro's package system (probably rpm or deb)

autoconf and automake for C/C++ projects


Obviously, you get to choose where to start You can do interesting things with pretty much any language; I've tried to list things that are particularly useful for dealing with existing apps and libraries.
 
1 members found this post helpful.
Old 11-24-2006, 09:33 AM   #6
tmick
Member
 
Registered: Jun 2005
Location: North Dakota
Distribution: Debian Testing
Posts: 247

Rep: Reputation: 20
Quote:
Originally Posted by Hko
No, that's not the case. In fact C++ is even banned from Linux.
Okay, I wasn't aware of that I followed the link and read. Now I know and understand I guess my corrected answer is forget about C++ unless you really want to learn it.
 
Old 11-24-2006, 09:43 AM   #7
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
From the languages you've listed, I'm presuming you want to approach things mainly from a pragmatic perspective. But I'd also like to suggest learning a couple languages that will help you understand the ideas of programming a little better: Scheme and Haskell.

Many functional languages can be thought of as a member of either the Lisp family or the ML (metalanguage) family. The former features identical syntax for data and code, the latter has very strong typing systems. Learning a Lisp-like language will teach you about how you can transform and treat data as code, and vice-versa, while learning a ML-like language will help you think about data very precisely and formally.

Not many of the functional languages are considered very pragmatic from the perspective of being able to interact with basically any existing software (like Perl can; Objective Caml probably comes closest here), but their capabilities can be used to come up with great ways to solve interesting and complex problems. Sometimes, once you come to terms with how they do certain things, you can emulate these features in other languages, for example Perl (see Mark Jason Dominus' excellent Higher-Order Perl book).

The other great thing about functional languages is that they often force you to think recursively, which makes some problems extraordinarily easier to solve, plus it gives you a much easier way to prove your programs (thanks to the fact that they naturally eschew side effects).
 
Old 11-24-2006, 10:38 PM   #8
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
...just an addition about Lisp, my favourite word to describe it is "impulsive." Instead of pre-thinking what you need to define/return/allocate/etc., you can just quickly write and inline code snippet to achieve the desired result (for the most part).

Long live Lisp.
 
Old 11-25-2006, 12:09 AM   #9
hiren_bhatt
Member
 
Registered: Oct 2005
Distribution: FC3,Debian
Posts: 127

Rep: Reputation: 15
From my point of view, this direction is not so proper.

Which language you should learn depends what you are interested in.

If you are interested in system side, i.e. kernel programming or device driver or similar you must learn C with knowledge of how operating system works, since linux in implemented in C.

If your interest is in developing applications you must consider C++ or Java. Java is a platform independent language which is an advantage of it.

If you are interested in GUI programming such as for KDE or GNOME. you should consider programing with QT and GTK.
GTK is an object oriented application programmers interface (API). It is written in C, but implemented using Object oriented ideas.
QT is a cross-platform development framework which uses c++.

Both QT and GTK are having bindings for other languages such as python, ruby, java and perl, i.e. you can use any language apart from c and c++.

Python and Ruby are interpreted languages and are excellent and powerful with all object oriented concepts.

Further if you what to do some web programming you may want php to be there.

Shell script is not a programming language, though you can do a lot with it. Basic shell script knowledge is helpful when you are with linux.

So my suggestion will be first you decide your domain and then learn language accordingly.
 
Old 11-28-2006, 03:44 PM   #10
gimmee
Member
 
Registered: Jul 2006
Location: New Zealand
Distribution: Fedora 17 64bit (Desktop) Fedora 15 (Laptop)
Posts: 98

Original Poster
Rep: Reputation: 17
Hi all

Thanks for all the helpful replies. I certainly didn't want to start a debate which was the best language that so and so uses so thanks for keeping it pretty nuetral. I will start on c and maybe a scripting language first.

Do most people use Anjuta for developing in or is that just a personal choice again?

Cheers

gimmee
 
Old 11-28-2006, 03:54 PM   #11
tmick
Member
 
Registered: Jun 2005
Location: North Dakota
Distribution: Debian Testing
Posts: 247

Rep: Reputation: 20
Quote:
Do most people use Anjuta for developing in or is that just a personal choice again?
My personal choice for "C" and C++ but for Java try Eclipse, and if you get the ambition to try C# use MonoDeveloper.
Just my
 
Old 11-28-2006, 07:30 PM   #12
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Quote:
Originally Posted by gimmee
Do most people use Anjuta for developing in or is that just a personal choice again?
I use Emacs for everything. One thing that's nice about IDEs (like Anjuta) is that they tie a lot of language-specific functionality together, but the great thing about using an editor (like Emacs) is that you've always got the same behaviour and functionality directly at hand, no matter what language you're using. Advanced editors like Emacs and Vim can interact with compilers, interpreters, and debuggers like language-specific IDEs can, but most of the time their code-completion features are lacking by comparison. Another great thing about Emacs is that it is easily extended to take on almost any functionality, which is one reason why I use it to edit code in less-popular languages like Erlang and SML, for which no (AFAIK) IDE exists. Eclipse and Vim can be extended, too. In all, I think if you're really working hard in a particular language, you can gain a lot from sticking to a particular IDE. But if you switch between languages often, or are into writing a lot of your own customizations, keeping with a single standard editor may be a better plan.
 
1 members found this post helpful.
  


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
What is the best programming language to learn jax8 Programming 25 04-04-2010 10:21 AM
When you and Linux learn to speak the same language! Mohtek LinuxQuestions.org Member Success Stories 5 12-23-2006 06:27 AM
How to learn programming in linux my-unix-dream Linux - Newbie 3 04-19-2005 03:19 AM
Best Way to Learn Linux Programming MrPeanut Linux - Newbie 2 07-20-2004 01:49 PM
Is Python a good language to learn for a newbie to programming? prophet621 Programming 2 05-19-2003 03:48 PM

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

All times are GMT -5. The time now is 10: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