473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Python for Java programmer

Yo Group,

I'm excited to learn Python as new language coming year, I consider
myself good Java developer and, not so unusually, with very limited
experience with dynamic programming languages such as Python or Ruby.

I have started with basics at http://docs.python.org, but I'm more
interested in learning philosophies in programming dynamically typed
languages, I really want to get rid of those Enterprisely weird Java
techniques.

I'm looking for good resources and a better technique to learn Python,
would appreciate book references or URLs for them (Google explodes me
with info. and I don't really have time to read all that). Also, I'm
looking forward to hack some framework or library written in Python to
get a good deal of exposure to language and class library, So it would
be great if anyone would suggest such framework as well.

Looking forward for suggestions Python community!

Thanks,
Nirav Thaker
http://blog.nirav.name
Dec 14 '07 #1
5 1501
On Dec 14, 11:53 am, Nirav Thaker <nirav.tha...@gmail.comwrote:
Yo Group,

I'm excited to learn Python as new language coming year, I consider
myself good Java developer and, not so unusually, with very limited
experience with dynamic programming languages such as Python or Ruby.

I have started with basics athttp://docs.python.org, but I'm more
interested in learning philosophies in programming dynamically typed
languages, I really want to get rid of those Enterprisely weird Java
techniques.

I'm looking for good resources and a better technique to learn Python,
would appreciate book references or URLs for them (Google explodes me
with info. and I don't really have time to read all that). Also, I'm
looking forward to hack some framework or library written in Python to
get a good deal of exposure to language and class library, So it would
be great if anyone would suggest such framework as well.

Looking forward for suggestions Python community!
You may want to check out these first:

http://dirtsimple.org/2004/12/python-is-not-java.html
http://www.razorvine.net/python/PythonComparedToJava

George
Dec 14 '07 #2
Nirav Thaker a écrit :
Yo Group,

I'm excited to learn Python as new language coming year, I consider
myself good Java developer and, not so unusually, with very limited
experience with dynamic programming languages such as Python or Ruby.
Then you'll probably have to unlearn a few things...
I have started with basics at http://docs.python.org, but I'm more
interested in learning philosophies in programming dynamically typed
languages, I really want to get rid of those Enterprisely weird Java
techniques.
Fine !-)

A good start is of course the now famous "Python is not Java" article:
http://dirtsimple.org/2004/12/python-is-not-java.html

Also FWIW, the dynamic part is not restricted to typing. You can
dynamically modify class or instance attribute set (including methods),
hook into lookup rules or class creation, dynamically create functions,
classes or modules, etc... Syntax errors set aside, everything happens
at run time.
I'm looking for good resources and a better technique to learn Python,
would appreciate book references or URLs for them (Google explodes me
with info. and I don't really have time to read all that).
Having a decent knowledge of Python's object model (with special
attention to the lookup rules - and how you can hook into -, the
operators overloading and other __magic__ methods, and of course
metaclasses) may help - since everything in Python is an object
(including modules, classes, functions etc). Once you understand what's
a Python object and how it works, you have a chance to start thinking
otherwise about how to structure your programs. Most of the relevant doc
is here:

http://docs.python.org/ref/objects.html
http://docs.python.org/ref/node33.html
http://python.org/doc/newstyle/
http://docs.python.org/ref/specialnames.html

Sadly, there isn't AFAIK any in-depth material exposing these features
and how they can used in real-world. But anyway:
Also, I'm
looking forward to hack some framework or library written in Python to
get a good deal of exposure to language and class library,
Note that the Python libraries (standard and thir-part) are not
necessarily that much class-oriented. With dynamic typing, you don't
need deep class hierarchies. And with everything being an object, you
end up thinking more in term of objects than in terms of classes.
So it would
be great if anyone would suggest such framework as well.
Here are a couple packages I learned (and I'm still learning) from:

- SqlAlchemy : a hi-level interface to RDBMS, including (but not
restricted to) an ORM layer,
- Elixir: a declarative layer on top of sqlAlchmy's ORM features,
- FormEncode : a conversion/validation lib, mostly used for the web but
usable for any outer-world/your-program data exchange. The "declarative"
API it's built upon is really worth reading if you want to see Python's
power in action, but beware, there are really things in it one should
not show to childrens !-)

HTH. And welcome onboard.
Dec 14 '07 #3
Welcome to Python!

One way to get you up to speed fast (and fun) is take some java app
you've written and implement it in Jython. After you've done that, and
gotten over the pleasant surprise of how short and clean your code has
become, go over the source again and see where you can replace calls
to java libs with calls to Python libs. E.g. for xml & xpath use
ElementTree instead of JDom, for timing use Python's timeit module,
etcetera. Although I've been using Python for a while now I've done
the same thing recently and was surprised by how clearly that exercise
showed Python's strengths.

Just go ahead and start programming is the best way to learn about the
philosophies behind a language.

2B
Dec 14 '07 #4
Having a decent knowledge of Python's object model

As explained clearly here:

http://www.cafepy.com/article/python...d_objects.html
http://www.cafepy.com/article/python...d_methods.html

2B
Dec 14 '07 #5
Berco Beute a écrit :
>>Having a decent knowledge of Python's object model


As explained clearly here:

http://www.cafepy.com/article/python...d_objects.html
http://www.cafepy.com/article/python...d_methods.html
I'm not sure these articles will bring that much to the OP.

Dec 14 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Prescod | last post by:
I skimmed the tutorial and something alarmed me. "Strings are a powerful data type in Prothon. Unlike many languages, they can be of unlimited size (constrained only by memory size) and can hold...
176
by: Thomas Reichelt | last post by:
Moin, short question: is there any language combining the syntax, flexibility and great programming experience of Python with static typing? Is there a project to add static typing to Python? ...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
2
by: Hal Vaughan | last post by:
I'm self taught and most of what I've been working on for the past several years has been entirely in Perl and Java. I've noticed that I can code about 5 times faster in Perl than Java, in part...
25
by: abhinav | last post by:
Hello guys, I am a novice in python.I have to implement a full fledged mail server ..But i am not able to choose the language.Should i go for C(socket API) or python for this project? What are the...
17
by: MilkmanDan | last post by:
I'll be a college freshman this fall, attending Florida Institute of Tech studying electrical engineering. I was considering taking some classes in programming and computer science, and I...
112
by: mystilleef | last post by:
Hello, What is the Pythonic way of implementing getters and setters. I've heard people say the use of accessors is not Pythonic. But why? And what is the alternative? I refrain from using them...
40
by: walterbyrd | last post by:
I mean other than sysadmins, programmers, and web-site developers? I have heard of some DBAs who use a lot of python. I suppose some scientists. I think python is used in bioinformatics. I...
270
by: Jordan | last post by:
Hi everyone, I'm a big Python fan who used to be involved semi regularly in comp.lang.python (lots of lurking, occasional posting) but kind of trailed off a bit. I just wrote a frustration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.