What to learn : Perl or Python

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

What to learn : Perl or Python

Postby DippyGirl » Sun Oct 31, 2010 12:02 pm

Hola - Newbie, please be gentle!
I am just discovering Linux, I want my PC to be more than a word processor and web browser, so I'm looking at various distros.
Currently, while I settle on my linux-of-choice, I am dual booting Ubuntu/Doze... Ubuntu install was a breeze.
Reason for post :
I want to learn a PC programming language. As a hobby not a job (been there done it dont like the timesheets)
Considering Perl and Python - leaning towards Perl (have discovered PerlMonks)

Any views on which direction to take, and maybe why...- including blind prejudice

I have a programming background on different platforms - assembler, various flavours of cobol and fortran, rexx.
So I am happy with compiling/scripting/syntax/layout differences.
Which ever I go for I will probably go back to the other one later on (as time permits)
If this is already covered in another thread just point me at it.
Thanks
Ciao
User avatar
DippyGirl
 
Posts: 6
Joined: Fri Oct 29, 2010 7:43 am
Location: Where the sun always shines

Postby Bazza » Sun Oct 31, 2010 6:38 pm

Hi DippyGirl...

I`m surprised no one else has come back yet, however...

Although powerful is a relative term you can do a lot with
a STANDARD Python install. Dependances for coding using
STANDARD Python are minimal... :)

Unlike PHP... :(

(Dunno about a Perl install though.)

No expert at Perl as I am a hobbyist coder too, AND, not a
very good one at that, but as you say you have a knowledge
of things even down at low, (assembly), level it won`t take
long to grasp the syntax of Python.

If you go for Python then start with Version 3.x NOT 2.x as
everything is shifting towards it...

My 5 pennoth FWIW. :)


EDIT:

BTW, "Doze" made me smile... ;o)
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby bobthebob1234 » Sun Oct 31, 2010 6:46 pm

learn everything!!
For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was
User avatar
bobthebob1234
LXF regular
 
Posts: 1371
Joined: Thu Jan 03, 2008 9:38 pm
Location: A hole in a field

Postby johnhudson » Sun Oct 31, 2010 9:18 pm

Python is fine for a hobbyist and for a professional developer; you can start with something very simple and add modules as you become more confident.

Python is also used in a lot of Google interfaces because of its flexibility.
johnhudson
LXF regular
 
Posts: 876
Joined: Wed Aug 03, 2005 1:37 pm

Postby leke » Mon Nov 01, 2010 7:30 am

bobthebob1234 wrote:learn everything!!
yeah, I second that. If you're saying it's for fun, you should play with both languages (and more). We would all be interested to hear your opinions of them too :)
User avatar
leke
LXF regular
 
Posts: 506
Joined: Mon Oct 22, 2007 5:45 pm
Location: Oulu, Finland

Postby Bazza » Wed Nov 03, 2010 3:36 pm

Hi leke...

When you reach bus pass age and beyond, it gets slightly more difficult
to learn everything... ;o)

Everything seems to start going wrong, sight, hearing, etc... :(
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby leke » Wed Nov 03, 2010 6:01 pm

Bazza wrote:Hi leke...

When you reach bus pass age and beyond, it gets slightly more difficult
to learn everything... ;o)

Everything seems to start going wrong, sight, hearing, etc... :(
I hope by the time I'm older, science will have cured all of those things :wink:
User avatar
leke
LXF regular
 
Posts: 506
Joined: Mon Oct 22, 2007 5:45 pm
Location: Oulu, Finland

Ruby!

Postby gwilymk » Wed Nov 10, 2010 6:11 pm

I personally get annoyed with how verbose python is so I tried ruby!

Although it is not perl or python, it is a scripting language and you get the amazing 'gem' command. Ruby's built in package manager.

And if your bored of writing applications, you can try 'rails'

Code: Select all
sudo gem install rails
or
su -c 'gem install rails'

doesn't get easier :)

Gwilym Kuiper[/quote]
gwilymk
 
Posts: 2
Joined: Wed Nov 10, 2010 5:50 pm

php forever

Postby mokakan » Sun Apr 03, 2011 6:48 pm

neither perl nor python, i think php is the best
mokakan
 
Posts: 1
Joined: Sun Apr 03, 2011 6:45 pm

Postby RockDoctor » Sun Jul 10, 2011 9:39 pm

Although I'm sure that by now the OP has selected her language of choice, I thought I'd post my thoughts here because the question is certainly a FAQ. For hobby coding, my advice is to just pick a language that looks interesting and go for it. Looking over at my bookcase, I see (in order left to right, top shelf to bottom shelf) books covering: HTML, Java, Perl, XML, JavaScript, Python, PHP, PL/1 (my old college text), 6502 assembly, 8086 assembly, Forth, SQL, C, and C++. Hmm, I wonder where my Pascal book is. :lol:
RockDoctor
 
Posts: 2
Joined: Sun Jul 10, 2011 9:04 pm
Location: Minnesota, US

Postby lok1950 » Sun Jul 10, 2011 10:21 pm

Hmm, I wonder where my Pascal book is.


In the recycling bin I hope :wink: Though I still have a few Pascal books in boxes that I haven't looked at in ages with my old college texts for IBM 360 Assembly.And leke you may not learn everything but there is no harm in trying too 8)

Enjoy the Choice :)
User avatar
lok1950
LXF regular
 
Posts: 1034
Joined: Tue May 31, 2005 5:31 am
Location: Ottawa

Postby Ram » Mon Jul 11, 2011 11:55 am

lok1950 wrote:
Hmm, I wonder where my Pascal book is.


In the recycling bin I hope :wink: Though I still have a few Pascal books in boxes that I haven't looked at in ages with my old college texts for IBM 360 Assembly.And leke you may not learn everything but there is no harm in trying too 8)

Enjoy the Choice :)


Mine are still on the top shelf ;) aswell hiding in some cupboards.

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1676
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Bazza » Mon Jul 11, 2011 1:32 pm

Which brings us to another POV for the OP...

Which languages should (S)he avoid then?

Lisp?
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby lok1950 » Mon Jul 11, 2011 2:34 pm

Lisp comes in handy if you use EMACS as then you can add extensions to it further blotting it's ego :lol:

Enjoy the Choice :)
User avatar
lok1950
LXF regular
 
Posts: 1034
Joined: Tue May 31, 2005 5:31 am
Location: Ottawa

Postby evilnick » Tue Jul 19, 2011 3:57 pm

I think there is a lot to be said in favour of many languages. Personally, the first language I learnt properly was Z80 assembly. Not very useful these days I grant you, but there was a certain discipline to assembly coding that I think has helped me a lot.

The language I wish I started with was C/C++. It might be a bit harder to grasp initially, especially tricky things with pointers and such, but really manages to bring together all of the central ideas about programming into one relatively clean and efficient language. The big problem is that it is difficult to learn by example, because if you look at real, working C code it can appear to be so much gibberish, even when you have an idea what is going on.

I think modern Perl and Python both solve this problem very well - Python is really easy to read as well as write, and does have a lot of commercial potential too.

There aren't any languages I wish I had never learned, but Algol and COBOL weren't really much use to me (thanks University of Surrey for making me learn them). I do have a sneaky kind of affection for FORTRAN, but I think that is mainly nostalgic.

Nobody seems to have mentioned Java either. While it may not be as fashionable as it was, it is still a powerful and useful language, if.you.dont.mind.a.lot.of.typing
User avatar
evilnick
Moderator
 
Posts: 151
Joined: Mon Apr 04, 2005 11:47 am
Location: LXF towers

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests