Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Python or Java?

Python or Java?
Thread Tools
Forum Regular
Join Date: Oct 2001
Location: Singapore
Status: Offline
Reply With Quote
Apr 9, 2002, 08:29 AM
 
Hi.

I have no programming background, apart from the QuickBASIC I did in school when 14.. I've been asking my friends who are into computing to recommend what to learn as a beginner's start. They are basically split into two camps: Java and Python.

Given that I know nuts... which would you people recommend I follow through and why?

Thanks.
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Apr 9, 2002, 09:41 AM
 
Java, for sure.

It has a nice, clean syntax.
A wonderfully rich set of APIs.
Encourages the use of good, object-oriented design practices.
Looks good on a resume.
And, can make you lots of $$$
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Mac Elite
Join Date: Feb 2001
Location: Bristol, UK, living in Melbourne, Australia
Status: Offline
Reply With Quote
Apr 9, 2002, 10:54 AM
 
Java's a nice language, sure. To be honest if you learn one, you'll pick up the other easily. I am a fan of python, but I would say learn Java first just because it's so universal. But bear in mind that *everyone* who goes to Uni nowadays to do computers comes out knowing Java, so python gives you a bit of a niche. Mind you, python is also something that you would probably use off your own initiative once you are in a job. I don't see many adverts for python programmers. Hell but if you learn Java you can learn Python in a day or two (just keep a good reference to hand). You can also use Java to program in Cocoa, whereas you can't use python.

Yeah so learn whatever, the more important thing is to adopt the 'mindset' of OOP, and get used to programming in whatever language.
     
Dedicated MacNNer
Join Date: Mar 2001
Location: Iowa City, IA
Status: Offline
Reply With Quote
Apr 9, 2002, 11:08 AM
 
I'll put in a vote for Python. It's much cleaner than Java, and it'll enforce good code formatting.

Once you've got Python down, you'll have the Java language within a day. (The Java libraries, on the other hand, will take a while, because they're so big.)

But Java isn't a bad choice at all for a starter language.
James

"I grew up. Then I got better." - Sea Wasp
     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Boston
Status: Offline
Reply With Quote
Apr 9, 2002, 12:09 PM
 
I think you need to qualify your needs a bit. Java and Python, while similar in syntax, are really very different tools.

Java is oriented towards building robust applications (think Web applications like servers and the code that runs on them) though you can script with it.

Python is oriented towards scripting (like Perl, only easier to read), though you can build robust apps in it. It's got good text handling capabilities that would be much more cumbersome in Java.

Java is strongly typed, meaning you have to declare what all your variables are and what your methods return (String, boolean, int, SomeObject, etc).

Python isn't, so you don't have to worry about the type most of the time.

Python will take less code than Java to do the same thing, usually.

Python's learning curve is much smaller than Java. You'll be doing really productive work faster in Python than Java.

A friend of mine's 6-year old kid is learning to program on Python.

Both are object-oriented, though I find the Java syntax nicer.

If you have a lot of time and want to go straight into hard-core programming, then Java is the place. If you just want to get your feet wet for a while and still be productive, Python is the one.

Jamie
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Apr 9, 2002, 02:15 PM
 
Originally posted by jamieorc:
<STRONG>
Python is oriented towards scripting (like Perl, only easier to read), though you can build robust apps in it. It's got good text handling capabilities that would be much more cumbersome in Java.
</STRONG>
Not so...
Java (finally) has java.util.regex for regular expressions.
The String and StringTokenizer classes when coupled with java.util.regex text handling very easy.

Unfortunately Apple is taking it's sweet time releasing JDK 1.4
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Boston
Status: Offline
Reply With Quote
Apr 9, 2002, 07:21 PM
 
Originally posted by Kristoff:
<STRONG>

Not so...
Java (finally) has java.util.regex for regular expressions.
The String and StringTokenizer classes when coupled with java.util.regex text handling very easy.
</STRONG>
True! And I've been using org.apache.oro.* all week!
     
daftpig  (op)
Forum Regular
Join Date: Oct 2001
Location: Singapore
Status: Offline
Reply With Quote
Apr 10, 2002, 06:23 AM
 
Hey.. thanks for all the replies so far..

To me, it sound like Java's good for a solid detailed programming foundation and Python's a good framework to see how all other things can fit in? Is that right?

Perhaps then, could I have some recommendations for books on both Java and Python for starters so I can go read up a bit and settle on one of them to concentrate?

Thanks..

kwok

P.S. Is there stuff in the Dev Tools for OS X that'll permit learning of Java? Or what will I have to get?
     
Mac Elite
Join Date: Feb 2001
Location: Bristol, UK, living in Melbourne, Australia
Status: Offline
Reply With Quote
Apr 10, 2002, 08:33 AM
 
Originally posted by daftpig:
<STRONG>Hey.. thanks for all the replies so far..

To me, it sound like Java's good for a solid detailed programming foundation and Python's a good framework to see how all other things can fit in? Is that right?

Perhaps then, could I have some recommendations for books on both Java and Python for starters so I can go read up a bit and settle on one of them to concentrate?

Thanks..

kwok

P.S. Is there stuff in the Dev Tools for OS X that'll permit learning of Java? Or what will I have to get?</STRONG>
Have a look at the how-tos and tutorials at the sun java site and at python.org, and download the documentation. That is the cheapest and most up to date read around!
     
daftpig  (op)
Forum Regular
Join Date: Oct 2001
Location: Singapore
Status: Offline
Reply With Quote
Apr 10, 2002, 12:27 PM
 
Originally posted by tinrib:
<STRONG>

Have a look at the how-tos and tutorials at the sun java site and at python.org, and download the documentation. That is the cheapest and most up to date read around!</STRONG>

Oh yah..

Guess college makes me more stupid...

     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Boston
Status: Offline
Reply With Quote
Apr 10, 2002, 10:07 PM
 
The Python Essential Reference from New Riders is great. It's only Python 1.x, but it's most of what you need to know. Hopefully there will be an update to 2.2 soon. The older O'Reilly ones weren't so hot. There are some newer books from several publishers, but I haven't looked at them.

For Java there's about a billion books. One thing to learn is data structures. I like the Data Structures and Algorithms in Java by Mitchell Waite. It gives you some of the building blocks of programming in Java.

Sun has tons of good online tutorials for Java. http://java.sun.com/docs/books/tutorial/

Jamie
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:41 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2