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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
10-21-2005, 11:58 PM
|
#1
|
Member
Registered: Jul 2005
Distribution: ubuntu5.04, ubuntu5.10, suse9.3, mandrake10.1, mandriva2006(beta), FC1-4, redhat9.0, debian sarge
Posts: 519
Rep:
|
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.
|
|
|
10-22-2005, 12:07 AM
|
#2
|
Member
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705
Rep:
|
stick with "C".........then move on to Perl.........
|
|
|
10-22-2005, 12:21 AM
|
#3
|
Senior Member
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479
Rep:
|
python? java? html? find something, jump in and try it.
titanium_geek
|
|
|
10-22-2005, 01:33 AM
|
#4
|
Member
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987
Rep:
|
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.
|
|
|
10-22-2005, 02:17 AM
|
#5
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
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.
|
|
|
10-22-2005, 02:25 AM
|
#6
|
Member
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601
Rep:
|
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.
|
|
|
10-23-2005, 05:26 AM
|
#7
|
Member
Registered: May 2005
Location: West Virginia, US
Distribution: Gentoo
Posts: 56
Rep:
|
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.
|
|
|
10-23-2005, 09:40 AM
|
#8
|
Member
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248
Rep:
|
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:
|
|
|
10-23-2005, 10:10 AM
|
#9
|
Member
Registered: Feb 2004
Location: Utrecht Holland
Distribution: MacOS, Debian, Raspbian
Posts: 76
Rep:
|
start at the beginning
for noob linux user i think BASH is most usefull
so BASH it is.
|
|
|
10-24-2005, 01:39 AM
|
#10
|
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:
|
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?
|
|
|
10-24-2005, 02:03 AM
|
#12
|
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:
|
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?
|
|
|
10-24-2005, 05:20 AM
|
#13
|
Member
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248
Rep:
|
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.
|
|
|
10-24-2005, 10:04 AM
|
#14
|
Member
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601
Rep:
|
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.
|
|
|
10-24-2005, 10:54 AM
|
#15
|
Member
Registered: Jun 2005
Location: Pretoria, South Africa
Distribution: Ubuntu, Fedora Core, RHEL
Posts: 37
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 07:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|