LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Which language to pursue? (https://www.linuxquestions.org/questions/programming-9/which-language-to-pursue-4175440567/)

graphicsmanx1 12-08-2012 06:58 AM

Which language to pursue?
 
Ive lately asked a lot of questions while trying to learn how to use Linux and have been given great options but it is overwhelming trying to learn awk, sed, bash, and perl. I do not want to burn out on coding. My main goal directive is to learn a language and apply it to my job and stay frequent in it. I did take a few classes and really learned java and vb that I thought about going back to just java. However, I've seen great potential with Linux Id like to learn more. So that being said what suggestion of language should I mainly focus on??


I do deal with xml files all day
Would like to build a web crawler one day for a personal project
I like modify images names
Move, rename and modify all other file types is fun

sycamorex 12-08-2012 07:12 AM

Python:

- it can do system administration
- it has lots of libraries for web (eg. frameworks, web-scraping, etc) stuff.
- it has good xml support
- it has numerous image libraries
- it is commonly used (google, dropbox - Yes, I read yesterday's article about Guido's move:))

TobiSGD 12-08-2012 07:43 AM

awk, Bash and sed are more usual in system administration, for anything web related people tend to use one of the scripting languages (Python, Perl, Ruby), they fit much better to this purpose. Python is very simple to learn, with an easy syntax, while Perl can look somewhat weird. I do not have experience with Ruby, so I can't comment on that. All three are very extendable with literally hundreds of ready made modules.
Java is usually used for server side programming of bigger applications and sometimes on the desktop.

graphicsmanx1 12-08-2012 07:54 AM

Quote:

Originally Posted by TobiSGD (Post 4845133)
awk, Bash and sed are more usual in system administration, for anything web related people tend to use one of the scripting languages (Python, Perl, Ruby), they fit much better to this purpose. Python is very simple to learn, with an easy syntax, while Perl can look somewhat weird. I do not have experience with Ruby, so I can't comment on that. All three are very extendable with literally hundreds of ready made modules.
Java is usually used for server side programming of bigger applications and sometimes on the desktop.

I did have some web applets I was challenged with completing is also another reason for java. I did use python for an intro programming course and enjoyed it. For some reason I really like making flowcharts in raptor.. I still dont know why? :confused:

markush 12-08-2012 10:47 AM

If you learn Perl you don't need awk. I love Perl for the culture behind it http://www.perlmonks.org/ and http://www.cpan.org/
Perl isn't as easy to learn as Python and Ruby. But you can learn Perl for years and will still learn new things.

Perl can be very expressive, it is very similar to human languages (Larry Wall, the inventor of Perl is a Linguist). Perl has a great community, I'd recommend to take a look at the newsgroup comp.lang.perl.misc

Markus

Sergei Steshenko 12-08-2012 11:30 AM

Quote:

Originally Posted by sycamorex (Post 4845124)
Python:

- it can do system administration
- it has lots of libraries for web (eg. frameworks, web-scraping, etc) stuff.
- it has good xml support
- it has numerous image libraries
- it is commonly used (google, dropbox - Yes, I read yesterday's article about Guido's move:))

Let's have a look at Perl - at the moment: http://www.cpan.org/ : "115,765 Perl modules in 26,329 distributions, written by 10,241 authors".


As I wrote many times in this forum, from the point of view of language features Python is slowly catching up with Perl, but still lack lexical scoping, for example.

Also, new Python releases break code more frequently than new Perl ones. http://qa.perl.org/cpan-testers/ .

dugan 12-08-2012 11:34 AM

Quote:

Originally Posted by sycamorex (Post 4845124)
Python:

- it can do system administration
- it has lots of libraries for web (eg. frameworks, web-scraping, etc) stuff.
- it has good xml support
- it has numerous image libraries
- it is commonly used (google, dropbox - Yes, I read yesterday's article about Guido's move:))

This.

Almost anything you can do in Java you can do better in Python.

sycamorex 12-08-2012 12:05 PM

To the OP:

As you can see, people tend to have different language preferences. The fact remains that you can't go wrong with either of the mentioned languages (be it Python or Perl). Just play with them and you'll decide for yourself.

Habitual 12-08-2012 12:11 PM

Quote:

...Would like to build a web crawler one day for a personal project...
To that end:
100 Spidering hacks

Chapter 1. Walking Softly:

Hack 1. A Crash Course in Spidering and Scraping
Hack 2. Best Practices for You and Your Spider
Hack 3. Anatomy of an HTML Page
Hack 4. Registering Your Spider
Hack 5. Preempting Discovery
Hack 6. Keeping Your Spider Out of Sticky Situations
Hack 7. Finding the Patterns of Identifiers

Chapter 2. Assembling a Toolbox:

Perl Modules
Resources You May Find Helpful
Hack 8. Installing Perl Modules
Hack 9. Simply Fetching with LWP::Simple
Hack 10. More Involved Requests with LWP::UserAgent
Hack 11. Adding HTTP Headers to Your Request
Hack 12. Posting Form Data with LWP
Hack 13. Authentication, Cookies, and Proxies
Hack 14. Handling Relative and Absolute URLs
Hack 15. Secured Access and Browser Attributes
Hack 16. Respecting Your Scrapee's Bandwidth
Hack 17. Respecting robots.txt
Hack 18. Adding Progress Bars to Your Scripts
Hack 19. Scraping with HTML::TreeBuilder
Hack 20. Parsing with HTML::TokeParser
Hack 21. WWW::Mechanize 101
Hack 22. Scraping with WWW::Mechanize
Hack 23. In Praise of Regular Expressions
Hack 24. Painless RSS with Template::Extract
Hack 25. A Quick Introduction to XPath
Hack 26. Downloading with curl and wget
Hack 27. More Advanced wget Techniques
Hack 28. Using Pipes to Chain Commands
Hack 29. Running Multiple Utilities at Once
Hack 30. Utilizing the Web Scraping Proxy
Hack 31. Being Warned When Things Go Wrong
Hack 32. Being Adaptive to Site Redesigns

and 68 more instructive articles indexed at my site.

Have fun. :)

NyteOwl 12-08-2012 02:02 PM

You need another poll option: all of the above :)

grail 12-09-2012 02:46 AM

+1 for Ruby

Sergei Steshenko 12-09-2012 06:22 AM

To the OP - in order to kind of stay in Java world, but not at all with Java, but with JVM, consider Scala ( http://www.scala-lang.org/ ), Clojure ( https://en.wikipedia.org/wiki/Clojure ).

But JVM in general is not very good for functional languages - was designed with different goals in mind.

markush 12-09-2012 06:47 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4845614)
To the OP - in order to kind of stay in Java world, but not at all with Java, but with JVM, consider Scala ( http://www.scala-lang.org/ ), Clojure ( https://en.wikipedia.org/wiki/Clojure ).

But JVM in general is not very good for functional languages - was designed with different goals in mind.

I don't think that the OP wants to go for functional programming. And if he would, I would not recommend to use Clojure but Common Lisp. Lisp has a large community.

Otherwise one can do functional programming with Perl

Markus

Sergei Steshenko 12-09-2012 07:00 AM

Quote:

Originally Posted by markush (Post 4845622)
I don't think that the OP wants to go for functional programming. And if he would, I would not recommend to use Clojure but Common Lisp. Lisp has a large community.

Otherwise one can do functional programming with Perl

Markus

I meant a possibility to reuse existing in Java "infrastructure".

markush 12-09-2012 07:03 AM

Quote:

Originally Posted by Sergei Steshenko (Post 4845624)
I meant a possibility to reuse existing in Java "infrastructure".

Oh, I misread this, but you're right, since the OP comes from Java.

Markus


All times are GMT -5. The time now is 02:37 AM.