LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-12-2009, 09:19 AM   #1
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Rep: Reputation: 31
What language is right for me?


I think I have a need to learn a programming language or similar, but I'm at a loss to know which one fits my needs well. I found lots of Web sites with comparisons, but they use lots of words that I don't understand. I need this just as a tool. I won't be going into CS.

- I need to manipulate or create files.

- I need to extract text from one file and rearrange it into another format in another file.

- I need to sort, alphabetize information; search for text matching a specific pattern.

- I need to generate or modify the syntax documents written in LaTex or other markup.

- I need to work with multiple languages and alphabets, all mixed together. Chinese, English, Russian, IPA.

- I need a language with some really really well-written books that can help me to get started.

- In the future, I may need to work with massive amounts of information (books), so I don't want to end up with a language that is going to suprise me by telling me, "Sorry, but you're limited to using only 19,908 of these things..."

I'm not good with math.

If I come back in six months, I want to know what I wrote.

- I don't need to make GUIs or any fancy software that another person other than myself will use.

- I don't need to put anything On-line.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-12-2009, 09:25 AM   #2
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
there are already programs that will do some of that (awk and sed) scripting sounds like what you want to be doing.
 
1 members found this post helpful.
Old 12-12-2009, 09:43 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 General View Post
- In the future, I may need to work with massive amounts of information (books), so I don't want to end up with a language that is going to suprise me by telling me, "Sorry, but you're limited to using only 19,908 of these things..."
"Massive" in software moved beyond the level of the amount of text in a book years ago.

Maybe you have ten thousand characters on a page (rough ballpark estimate). Maybe you have a thousand pages in a book. That would be ten million characters of text.

Processing ten million characters of text is a scale of operation where you don't even consider the performance. You just consider the convenience and accuracy with which you can specify the operation.

Maybe you can still find some lame old text processing tools that limit you to 19,908 of some interesting feature. But with most languages and tools you aren't going to hit any significant limits within ten million characters of text.

If you want to process massive amounts of information (which today might be complex transformations of thousands of books at a time worth of text), your best choice would be C++. But if you're not going to be a professional programmer and you don't need C++, I wouldn't advise you to learn it for your project.

Last edited by johnsfine; 12-12-2009 at 09:48 AM.
 
Old 12-12-2009, 09:55 AM   #4
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by General View Post
- I need to manipulate or create files.
Perl,Python

Quote:
- I need to extract text from one file and rearrange it into another format in another file.
Perl,Python

Quote:
- I need to sort, alphabetize information; search for text matching a specific pattern.
Perl,Python

Quote:
- I need to generate or modify the syntax documents written in LaTex or other markup.
Perl,Python

Quote:
- I need to work with multiple languages and alphabets, all mixed together. Chinese, English, Russian, IPA.
Perl,Python

Quote:
- I need a language with some really really well-written books that can
help me to get started.
Perl,Python

Quote:
- In the future, I may need to work with massive amounts of information (books), so I don't want to end up with a language that is going to suprise me by telling me, "Sorry, but you're limited to using only 19,908 of these things..."
Perl,Python

Quote:
I'm not good with math.
Perl,Python

Quote:
If I come back in six months, I want to know what I wrote.
Python

Conclusion: Python.
 
2 members found this post helpful.
Old 12-12-2009, 09:59 AM   #5
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 807

Rep: Reputation: 40
Python is ideal for what you're doing as is Perl. FWIW I found Python easier to learn than Perl, but that's just how my brain works.

This is a good book.
 
Old 12-12-2009, 10:17 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 ghostdog74 View Post
Quote:
If I come back in six months, I want to know what I wrote.
Python
That depends a lot on the programmer, and I haven't done enough in Perl for a meaningful comparison. But I have done enough in Python and enough other languages to know that is a weakness of Python, not a strength.

Python makes it much easier to slap together an unmaintainable mess that initially works, than Java or C++ or many other languages.

I have worked on code written by bad programmers in many languages. Bad programmers make a bigger mess in Python than in many other languages. They are less able to remember or explain their own code a few months later in Python than in many other languages.

I have never worked on any good code in Python (because the good programmers I have worked with would never select Python). I expect some of the Python advocates here at LQ can write good code in Python. More of writing good code comes from the programmer, not the language.

Python may well be better than Java for text processing applications. But it doesn't come near Java for guiding you toward writing the kind of code you will still understand when you look at it six months later.
 
0 members found this post helpful.
Old 12-12-2009, 10:25 AM   #7
linuxpokernut
Member
 
Registered: Jul 2007
Distribution: Slackware 14
Posts: 237
Blog Entries: 8

Rep: Reputation: 59
You want perl.
 
Old 12-12-2009, 02:43 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
C is good to learn but not so great at rearanging files etc.
Quote:
- I need to manipulate or create files.
BASH
Quote:
- I need to extract text from one file and rearrange it into another format in another file.
BASH
Quote:
- I need to sort, alphabetize information; search for text matching a specific pattern.
BASH
Quote:
- I need to work with multiple languages and alphabets, all mixed together. Chinese, English, Russian, IPA.
C, Not sure about bash.
Quote:
- I need a language with some really really well-written books that can help me to get started.
Google
Quote:
- In the future, I may need to work with massive amounts of information (books), so I don't want to end up with a language that is going to suprise me by telling me, "Sorry, but you're limited to using only 19,908 of these things..."
Basically anything
Quote:
If I come back in six months, I want to know what I wrote.
Thats a tough one
 
Old 12-12-2009, 03:10 PM   #9
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
I second Perl, it's made for text processing, has excellent documentation and a great deal of modules which will help you with many related tasks to your subject.

Just learn how to write it properly and don't just hack it into your editor and you'll be fine.

You get "speed" on top of it, btw.

You should consider buying "Mastering Regular Expressions" which will help you anyway - no matter wether you chose Perl or Python.
 
Old 12-12-2009, 03:18 PM   #10
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
It really depends on how you intend to sort things, i.e. if you'll be sorting structured data or not. For example, if you're sorting contact info (name, phone, etc.) it might not be as simple as sorting lines of text, especially if you need to sort by multiple criteria. I'd say shell scripting isn't what you need because although it could be made to work, you'd be learning to deal with unnecessary confines vs. learning how to effectively choose a language based on your requirements. I use 6 languages at work regularly, often combining them in chains of tools, based on what I need to get done.

You should figure out how your data needs to be dealt with (specifics,) turn that into how it might be grouped into objects or structures and how they might be acted on, then choose a language that can support those representations and operations. You might consider C++, lisp, or Java. Though they take longer to learn than some simpler languages, you'll be able to learn other languages after that fairly easily.
Kevin Barry

PS I guess I consider shell scripting an incidental skill required of anyone who needs to get anything done in Linux, so don't skip it, but don't treat it as a destination.

Last edited by ta0kira; 12-12-2009 at 03:21 PM.
 
Old 12-12-2009, 04:25 PM   #11
gerard4143
LQ Newbie
 
Registered: Jan 2008
Location: P.E.I. Canada
Posts: 18

Rep: Reputation: 1
Python - Its a general purpose programming language that's easy to use and has loads of (free) tutorials/docs
 
Old 12-12-2009, 04:27 PM   #12
titanium_geek
Senior Member
 
Registered: May 2002
Location: Horsham Australia
Distribution: elementary os 5.1
Posts: 2,479

Rep: Reputation: 50
For reference, my university (I'm working towards a Bachelor of Computer Science) used to teach C++ to first years, jumped on the Java bandwagon when I was in first year, so I learnt Java, in second year, I could use C, Java, or whatever (with permission) for my pracs, I had to learn Python for another one of my subjects, (and I have just begun to learn Lisp.) Other languages around are Perl, Javascript, HTML, PHP. I have also played with Bash.

The key to learning how to program is not so much about what language you choose (though that can help) but actually learning how to program. You can mess around with *insert language* and not really learn much beyond "hello world" if you don't understand algorithms, data structures, and how programming works.

If BASIC and HTML don't count as "real" languages, I started with Java. I found Python pretty easy to learn, but I had already understood the concept of programming, so I could look up on google: "I want to do *this*" and work out how to do it in Python.

Most languages today (Perl, Java, Python, C, C++, Bash, etc) have heaps of googlable resources to help you out.

So, pick a language. Don't listen to "this other language is way better" in at least your first 6 months: stick to your guns. Your job is to conquer how to program, and it doesn't matter what you pick, you can learn more easily after the first one. There are some good suggestions in this thread- Perl or Python (etc) would be good choices.
 
Old 12-12-2009, 04:51 PM   #13
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
General -

I don't disagree with any of the replies people have posted, and I especially agree with ghostdog74 and titanium_geek.

If you're curious about Perl, and if you're looking for a very "well-written book", you can't go wrong with the classic "Llama book":

http://www.amazon.com/Learning-Perl-.../dp/0596520107

IMHO ..PSM
 
Old 12-12-2009, 05:36 PM   #14
General
Member
 
Registered: Aug 2005
Distribution: Debian 7
Posts: 526

Original Poster
Rep: Reputation: 31
When I meant "massive", I should have stated "about 400 million words." I see now, maybe that adjective isn't so good to use in the computing world. It is a number pretty much too big for me to comprehend.
 
Old 12-12-2009, 06:22 PM   #15
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 807

Rep: Reputation: 40
Quote:
Originally Posted by johnsfine View Post
That depends a lot on the programmer, and I haven't done enough in Perl for a meaningful comparison. But I have done enough in Python and enough other languages to know that is a weakness of Python, not a strength.

<snip>

I have never worked on any good code in Python (because the good programmers I have worked with would never select Python). I expect some of the Python advocates here at LQ can write good code in Python. More of writing good code comes from the programmer, not the language.
Suggesting good programmers you know would never work on Python is bizarre and then saying maybe some good programmers here might use it is insulting.

Any language can be hard to follow if not well written and well documented.

The counter argument to Java is it's slow due to it needing a virtual machine. The fact is, if you write Python code in a well structured way and comment it well, it will be as readable as any language.
 
  


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
which language is this?.... rajesh84210 Programming 10 08-12-2009 12:33 PM
Good linux chinese language language program? darsunt Linux - Software 1 04-10-2009 12:06 PM
which language? caminoix Programming 14 06-27-2005 04:57 PM
what language? andrewlkho Programming 4 07-20-2003 12:22 AM
Next Language Task Programming 5 07-18-2003 08:54 AM

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

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