LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-21-2005, 11:58 PM   #1
boxerboy
Member
 
Registered: Jul 2005
Distribution: ubuntu5.04, ubuntu5.10, suse9.3, mandrake10.1, mandriva2006(beta), FC1-4, redhat9.0, debian sarge
Posts: 519

Rep: Reputation: 32
good language for beginners


what is the easiest/less confusing language to learn? i know you cant tell me whats easiest for me to learn but im trying to get ideas on what is a good beginners lang. i started with C but its starting to confuse me a bit with different ways of getting the same output so any ideas on beginners lang. please advise thank you.
 
Old 10-22-2005, 12:07 AM   #2
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
stick with "C".........then move on to Perl.........
 
Old 10-22-2005, 12:21 AM   #3
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
python? java? html? find something, jump in and try it.

titanium_geek
 
Old 10-22-2005, 01:33 AM   #4
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
I am kind of slow(when it comes to programming), but am able to write a simple python app. It is such a high level language it is easy to learn. It is very satisfying to make a useful program with minimal lines of code. You can hack a usefull script with hardly any effort. their are great tool kits that make writing a gui app fairly easy.
 
Old 10-22-2005, 02:17 AM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
I'm a firm believer in "the best tool for the job" ... I think it makes sense to start out with a project you'd like to do, and then choose the best language for that project. It might be bash, PHP or Perl, it might be C, C++ or Python.

Having said that ... if you were to just "take a class" somewhere ...

I think Java is probably a best "first language". Java is to object oriented programming what Pascal was to structured programming: a "good way to learn good programming habits".

In contrast, I honestly believe C++ is a really, really bad choice for a "first language". There's simply too much you have to know all at once to use C++ effectively, it's just too easy to pick up poor habits.

I'm not saying C++ is a poor language, but I do feel it's too easy to misuse ... and not even be aware you're misusing it. I honestly feel it's much easier for a beginner to "do the right thing" in Java ... and virtually impossible for that same beginner in C++.

IMHO .. PSM

PS:
I totally agree with shanenin about Python being a great choice. Depending on the specific project you had in mind, 'C' could be an equally good choice. and of course you already know my opinion about Java ;-)

Last edited by paulsm4; 10-22-2005 at 02:19 AM.
 
Old 10-22-2005, 02:25 AM   #6
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Depends on what kind of programs you want to write:

device drivers, low-level libraries, games that require every cycle: C or C++

everything else: Perl. ;)

> what is the easiest/less confusing language to learn?

Hm...

Try a number of languages (ex. Perl, Python, Ruby, Java) -- spend a few days with each one learning the basics and reading about what folks have to say about it. Some languages have a different "feel" to them than others, and so appeal to different sorts of folks. I've never tried Haskell, Scheme, Lisp, or OCaml, but I've heard their names bandied about -- you may want to look into them also. Dunno. There's some links at the FSF directory http://directory.fsf.org/devel/prog/ that might be helpful.

Last edited by johnMG; 10-22-2005 at 02:28 AM.
 
Old 10-23-2005, 05:26 AM   #7
mcgrew
Member
 
Registered: May 2005
Location: West Virginia, US
Distribution: Gentoo
Posts: 56

Rep: Reputation: 21
My vote is for Python. PHP may be a good choice as well. Plus, if you learn php, you can use it for web programming too.

Python and java were my first languages. I love Python, Java is not bad, but extremely wordy.

For example if I want to print to the console:

Python:
Code:
print "Hello World"
Java:
Code:
System.out.println("Hello World");
PHP:
Code:
echo "Hello World";
Not too bad in any of them. Now I want to capture keyboard input from the console

Python
Code:
in = raw_input(prompt)
Java:
Code:
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.print(prompt);
in.readLine();
I'm actually not sure how to do this in php. I've never tried.
But I hope I've made my point for Python vs. Java anyway.
If you need more convincing, I was able to write this program within 3 months of using it, which is much more than I can say for java.
Check out php if you're more interested in a language that can be run within web pages.

Last edited by mcgrew; 10-23-2005 at 05:28 AM.
 
Old 10-23-2005, 09:40 AM   #8
Orkie
Member
 
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248

Rep: Reputation: 30
Quote:
Originally posted by mcgrew
I'm actually not sure how to do this in php. I've never tried.
I'm not sure if it is the way that it 'should be done' but you can get console input in PHP like this:
Code:
$i = fgets(STDIN);
 
Old 10-23-2005, 10:10 AM   #9
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76

Rep: Reputation: 15
start at the beginning

for noob linux user i think BASH is most usefull

so BASH it is.
 
Old 10-24-2005, 01:39 AM   #10
boxerboy
Member
 
Registered: Jul 2005
Distribution: ubuntu5.04, ubuntu5.10, suse9.3, mandrake10.1, mandriva2006(beta), FC1-4, redhat9.0, debian sarge
Posts: 519

Original Poster
Rep: Reputation: 32
Re: start at the beginning

Quote:
Originally posted by bglnelissen
for noob linux user i think BASH is most usefull

so BASH it is.
ok i would love to learn bash that sounds like it would be very usful since it seems to be used alot. anything like a guide online or something to help me get started with it?
 
Old 10-24-2005, 01:48 AM   #11
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Smile

Work your way through this for a couple weeks, take time when you learn something interesting to play around with the idea:

http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

After you feel comfortable, move on to this one

http://www.tldp.org/LDP/abs/html/
 
Old 10-24-2005, 02:03 AM   #12
boxerboy
Member
 
Registered: Jul 2005
Distribution: ubuntu5.04, ubuntu5.10, suse9.3, mandrake10.1, mandriva2006(beta), FC1-4, redhat9.0, debian sarge
Posts: 519

Original Poster
Rep: Reputation: 32
is bash something you can write and compile at terminal or should i use anjuta or emacs or ect. and does it use the gcc compiler?
 
Old 10-24-2005, 05:20 AM   #13
Orkie
Member
 
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248

Rep: Reputation: 30
bash is the terminal on most systems. When you run a bash script, it runs it through the same program that the terminal runs through. It doesn't need to be compiled and you should be able to write a script for it in any editor.
 
Old 10-24-2005, 10:04 AM   #14
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
boxerboy -- that's the whole point of a shell script: anything that you type in at the terminal can also be written in a script instead. The standard shell these days is bash. When you type in a command at the command line, bash interprets it. When you run a shell script (that starts with #!/path/to/bash), bash interprets it.

The text file that you create -- the script -- is filled with exactly the same stuff you'd type in at the prompt. They're both interpreted by the same program: bash. Here's an example of a script:
Code:
cd ~
tar cvf bkup.tar my_docs
echo "Done creating backup."
du -hs bkup.tar
You can also put loops and other control structures in your shell scripts. You can do those things at the command line too, but it's just more common to stick them in a script to save you from having to type them more than once.

Last edited by johnMG; 10-24-2005 at 10:09 AM.
 
Old 10-24-2005, 10:54 AM   #15
tristanm
Member
 
Registered: Jun 2005
Location: Pretoria, South Africa
Distribution: Ubuntu, Fedora Core, RHEL
Posts: 37

Rep: Reputation: 15
Hi

Hang in there with the language you pick because once you learn one language you will find it much easier to extend that knowledge to others and thus learn them much quicker.

Also consider your choice of bash because I dont think you can write apps with it, just scripts. It also wont give you any idea of object orientated programming.

This comes back to what you will be doing with it. If you will be writing games or apps with GUIs then I recommend starting with C or Java (Java is object orientated (OO) while C is not) and moving on to C++. There are some really great C++ books out there which make it easy to learn if you have some programming background (search this forum for a thread about the books, i am sure i remember seeing one). You may find it easier to start with Java because then you will immediately start think of things in terms of the OO approach.

Whatever you try, good luck.

Cheers
Tristan
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
what's a good beginners C or C++ book PennyroyalFrog Programming 18 01-31-2005 07:49 PM
What is a good distro for beginners? JediKnightNaso Linux - Software 3 08-07-2004 10:08 PM
Good books for beginners Gar Linux - General 2 11-23-2003 12:36 AM
A good language to start with. KptnKrill Programming 77 07-21-2003 05:20 PM
Good FAQ/Book for Linux Beginners? ShakyJake Linux - Newbie 1 04-13-2003 11:42 AM

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

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