You are not logged in.

#1 2008-10-16 13:11:52

kimmag
Member
Registered: 2008-10-08
Posts: 3

What programming language should i learn?

Hey! Im new to Archlinux, and linux aswell. I have a friend, which make lots of cool stuff in Archlinux. He says he use c++ etc. I havent readed so much about Archlinux, so i wonder, where should i start? What is the easiest and coolest? Anyone want to tell me? smile
BTW: What language does "terminal" use?
Could you add a tutorial link too, which YOU mean is a good tutorial?
I really hope for an answer, aswell this is my first post on this forum.
Have a good day.
Kim

Offline

#2 2008-10-16 13:17:22

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: What programming language should i learn?

Don't start with programming. Move that to your medium-term to long-term goals. If you've just switched to Linux, you have a lot of learning you need to do. UNIX is a hugely flexible OS, but with that comes responsibility, so you need to know how to wield your sword well before you wield it.

Head to the Arch Wiki (http://wiki.archlinux.org/) and read the beginner's guide. Read this. Read that. If you don't know something or it looks interesting, read it. If you don't understand something, google it. Wikipedia is typically a good source of info; head there for your best bet at a definitive answer to/for something.

And about the terminal... it doesn't use a language. Things just print to it. And read stuff from it. That's it. Read about escape sequences to learn about how programs control (almost) all available aspects of the terminal.

AFTER you've read the wiki, played with (and even maybe broken/fixed) your system a little... take a look at the various languages out there, and pick the one you like the most. There are too many to count, really.

In the end you're going to have to use something like C because C is the UNIX language and you can't escape it, so getting used to the C syntax will benefit you in the end. Try reading about pointers (head to wikipedia for that one for sure but NOT wikibooks, the wikibooks article is really bad even though I tried to help it a bit) and if you can get your head around those, try skipping all the other languages out there and going straight to C.

Regardless of whether you use C at first, just know this: C is very low-level and is highly expressionistic. You have to input a lot of code to get what you want done with C, but not so much with other languages. C is, however, the second-fastest language out there, following assembly language. So, when you need speed, use C. However, for quick one-time executions or various system tools or utilities, you can usually get by with the shell or something like that.

In my opinion, here are a list of languages sorted in order of simplicity:

Shell scripting - built into your shell. Very simple to use but follows a rather interesting and highly loose structure.
PHP - many people will call you a wuss for using this, but I used it for months and it was great. Its support for graphical programs is very poor, so it's best kept to web- and shell-oriented scripting.
Ruby - this follows an almost English grammar, so is very readable and learnable. On the other hand, it's known to be amazingly, amazingly slow.
Perl - from how I've seen this used, I'd say that people would agree with me calling this UNIX's scripted, interpreted alternative to C. Perl is also written in Perl itself, which is quite a nice feature. You can write almost absolutely anything in this, but don't expect it to be too fast - Perl is quite a bit faster than Ruby, but not nearly as fast as C.
Python - Google use this for their help center thingy, and so do a lot of other projects. It requires you use indentation for formatting, however, so you can't make one-liners with this. It's HIGHLY structured, and from my perspective best for apps that need to be extended over time.
C++ - not much I can say for this one, except that it's like C, but OOP.
C - this is THE definitive, de facto UNIX language. If you ever write something remotely successful on a large scale that's small, fast and stable, it will almost likely be in C, and will most likely have taken a huge number of hours off of your hands before it was completed. tongue
Assembly - this is more complex than C. I won't discourage you from having a look at the Wikipedia article on this, but don't worry if it takes you a long time to "get" it tongue

Just my two cents.

-dav7

Last edited by dav7 (2008-10-16 19:15:28)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#3 2008-10-16 13:21:48

kimmag
Member
Registered: 2008-10-08
Posts: 3

Re: What programming language should i learn?

Thank you really much for an answer.
I will follow your tips, thank you really much.
smile

Offline

#4 2008-10-16 13:32:14

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: What programming language should i learn?

That's fine big_smile

-dav7


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#5 2008-10-16 14:09:20

mentallaxative
Member
From: Australia
Registered: 2008-07-14
Posts: 134
Website

Re: What programming language should i learn?

This thread was helpful to me when I was looking for the same information as you: http://bbs.archlinux.org/viewtopic.php?id=52345

From that and dav7's post, you should be able to google for any information you want. There are _stacks_ of tutorials, howtos, references and bits of code to learn from. If you don't understand a language or concept and you feel your enthusiasm waning, don't be afraid of trying something else.

Oh, and have fun. smile

Offline

#6 2008-10-16 16:19:51

Kknd
Member
From: Brazil, Santa Catarina
Registered: 2007-08-15
Posts: 100
Website

Re: What programming language should i learn?

I suggest you learn C (is the basis of almost everything, including most of the other languages) and them learn a dynamic and/or scripting language.

Offline

#7 2008-10-16 19:02:17

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: What programming language should i learn?

kimmag wrote:

Hey! Im new to Archlinux, and linux aswell. I have a friend, which make lots of cool stuff in Archlinux. He says he use c++ etc. I havent readed so much about Archlinux, so i wonder, where should i start?

You should start by getting Linux up and running, and getting comfortable using it.

kimmag wrote:

What is the easiest and coolest?

Common Lisp, of course. tongue If I were to recommend a language to know, it would be at the top of my list. Buuut... it doesn't have so many libraries (libraries are code that other people have written to perform common tasks), so it isn't as newbie-friendly for many kinds of programs. A better suggestion for a newbie would be to read How to Design Programs. DrScheme, which you will need to do the exercises in the book, can be installed though pacman, Arch's package manager.

You can write a lot of programs without ever touching C, but knowing some C can come in handy, considering the sheer number of programs written in C. Unless you're writing device drivers or certain low-level parts of programs that do real-time audio or video work, there's no reason to ever write your own programs in C. I don't recommend using it unless you're sure you need it, since writing C code is a time-consuming process.

C++ is a terrible language. Only learn it if you think you can get someone to pay you to use it (which is fairly likely, actually), and only use it when someone actually is paying you. The most important thing to remember is that the joke is on them, for picking a language that lets you rack up so many billable hours (in compile time alone!).

But the bottom line is that you can learn things using any language, and it's not really important which one you start with. You can (and should) try different languages as much as you like, so unless you're really worried about "wasting" a few weeks messing with a language you will decide you don't like using, you can just jump in with the first one that catches your eye. The only times it really matters which language you pick are when you need to write a program fast or when you're writing a program that you will have to continue working on for years. You can even play with C++ if you want. lol

kimmag wrote:

BTW: What language does "terminal" use?

Like dav7 says, the terminal doesn't use a language, it's just a place that programs can write text to. You're thinking of the shell, which is a program that runs in the terminal and provides a command line. There are lots of shells, but bash is the most common one, and is the default.

Offline

#8 2008-10-16 21:11:16

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: What programming language should i learn?

dav7 wrote:

Perl is also written in Perl itself, which is quite a nice feature.
-dav7

Excuse my stupidity but how can that be possible ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#9 2008-10-16 22:30:19

jimi_hendrix
Member
Registered: 2008-10-14
Posts: 27

Re: What programming language should i learn?

moljac024 wrote:
dav7 wrote:

Perl is also written in Perl itself, which is quite a nice feature.
-dav7

Excuse my stupidity but how can that be possible ?

TIME PARADOX yikes

id say go with python since its very simple

i learned using C# but this was before i started using linux...you can use some of the language in linux but it is a M$ language and you will not get full support

java is like C# and is taught in a lot of high schools around me and i have heard its good for beginners

Offline

#10 2008-10-16 22:43:16

catwell
Member
From: Bretagne, France
Registered: 2008-02-20
Posts: 207
Website

Re: What programming language should i learn?

moljac024 wrote:
dav7 wrote:

Perl is also written in Perl itself, which is quite a nice feature.
-dav7

Excuse my stupidity but how can that be possible ?

I don't think it's true for Perl since there's no good compiler but it is for an implementation of Python for example.

As long as you have a compiled language it's possible : you use an older version of the compiler to compile the newer one (and then most of the time you compile the newer one again with itself). Of course it's the same with GCC, they don't write it in assembler...

There's always the problem of the bootstrap of course (the first version of a compiler has to be written in something else) smile

For the OP I'd say begin with a well-structured, imperative scripting programming language. Python is good because it kind of forces you to write code that's easy to understand, but even Bash is OK. Then do whatever you want and focus on a project of your own, like "I want to write Starcraft 3 in LOGO", or maybe something more realistic. Reading Knuth's books (The Art Of Computer Programming) could also be a good thing to do if you want to understand how clever algorithms work.

Last edited by catwell (2008-10-16 22:47:08)

Offline

#11 2008-10-16 22:51:39

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: What programming language should i learn?

The perl interpreter is written in C, not Perl.

kimmag, you should get used to Linux before you begin programming. Learn to use the command-line. You should probably stick with bash as your interactive shell, at least until you know it well enough to leave it. Learn Bourne shell scripting.

Python is a great first programming language because it is easy to learn, has a compact core syntax that is easy to retain in your head, is interpreted which removes the compile phase of the development cycle and makes it great for rapid prototyping, has excellent documentation, has a powerful implementation of OOP but is also multiparadigm, uses dynamic typing,  produces very readable code, and has a huge application domain. The official tutorial is very good, as is this one.

Then you should probably learn a new language every year or so, maybe even more frequently. Other useful languages to know include C, C++, Java, Perl, and Ruby, as well as functional languages like Lisp, Haskell, and OCaml. If you intend to go into web design, learn JavaScript and PHP (as well as [X]HTML and CSS).

Welcome to Arch Linux!

Offline

#12 2008-10-16 22:54:38

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: What programming language should i learn?

These threads come up periodically. Rather than suggest a specific language (python :-D), I suggest you study and learn several languages. At once. Each one will teach you different aspects of what it means to be a good programmer and in different ways.

For example, I recently ran into a guy whose day job is Java but he does some python coding on the side. He said that since he learned python he's a much better Java programmer.

For any language out there you can spend a couple hours understanding the basic introductory tutorials on that language and then move on to the next one. At some point you will think "man I need an app that does <something cool>" and will quite naturally decide to use whichever language you have experience with that feels most suitable for that app.

Dusty

Offline

#13 2008-10-16 23:18:37

jimi_hendrix
Member
Registered: 2008-10-14
Posts: 27

Re: What programming language should i learn?

Dusty wrote:

These threads come up periodically. Rather than suggest a specific language (python :-D), I suggest you study and learn several languages. At once. Each one will teach you different aspects of what it means to be a good programmer and in different ways.

For example, I recently ran into a guy whose day job is Java but he does some python coding on the side. He said that since he learned python he's a much better Java programmer.

For any language out there you can spend a couple hours understanding the basic introductory tutorials on that language and then move on to the next one. At some point you will think "man I need an app that does <something cool>" and will quite naturally decide to use whichever language you have experience with that feels most suitable for that app.

Dusty

+1

i find i learn a lot from learning multiple languages (more then i can remember right now) and posting on forums

making programs for my self helps too (even if i dont finish them)

Offline

#14 2008-10-16 23:39:19

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: What programming language should i learn?

catwell wrote:
moljac024 wrote:
dav7 wrote:

Perl is also written in Perl itself, which is quite a nice feature.
-dav7

Excuse my stupidity but how can that be possible ?

There's always the problem of the bootstrap of course (the first version of a compiler has to be written in something else) smile

Exactly my point wink


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#15 2008-10-17 00:02:17

Jerry
Member
From: Philippines
Registered: 2007-09-14
Posts: 126

Re: What programming language should i learn?

This is a good introduction:
http://openbookproject.net//thinkCSpy/

I used it when I was new to python.

CommonLisp is fun but it can be a pain to setup (emacs, slime, sbcl).  It took me a while to get everything to work,  If this part would be easier this would be a good first language.  When I look back it's all worth the trouble but I wouldn't recommend it as a first language.

Offline

Board footer

Powered by FluxBB