I have been trying to figure out what are the best books to have as a reference and learning material on Python and Java/Javascript.

Not the python I'm looking for... yet
The reviews out there on Amazon don’t really tell me if they are good or not and they end up all over the map on commentary, mostly on possitive territory. I’m sure there is grade inflation in Amazon just like everywhere else. So I’m asking help from someone out there who might decide to take pity on me. I’m checking if Blogs can be used as a call for help with some requests for information or not.
I’ve asked around locally and gotten blank stares.
To make the job simpler, I’ll tell you what have I zeroed on, hoping to get some feedback on if these are good or not. And if you suggest some alternatives, please let me know why you like them. Here is my shopping list:
`Programming in Python 3: A complete introduction to the Python Language’, by Mark Summerfeld.
`Python in a Nutshell’, second edition, by Alex Martelly
‘Javascript, the definitive guide’, by David Flanagan
‘Java in a Nutshell’, 5th edition, by David Flanagan
‘Java examples in a Nutshell’, 3rd edition, by David Flanagan

Here is one that I liked a lot. I think you can download chapter 2 for free.
Beginning Python Visualization
http://www.apress.com/book/view/1430218436
Maybe it doesn’t go into the very basics of python, but other than that it is like it is written for science.
I don’t know about Python, but I’ve just recently learned the basics of Javascript and have a few years’ Java experience. Be aware that the similarity between Java and Javascript is fairly superficial, so it might be a good idea to learn them separately in order to avoid confusion. I would say that Javascript combined with RoR, PHP or Python is the best choice for doing things on the web and that Java is best saved for standalone desktop apps. You might also want to look into learning JQuery pretty early on in your Javascript education, as it eliminates a lot of quirks and browser incompatibilities that are a headache to deal with in plain Javascript.
As for books, I think that the main thing to be aware of is whether or not they assume that the reader is familiar with programming in any other language or not. If you have any experience with languages that have a similar syntax to C (e.g. C/C++, Pascal, PHP, Java) then you want to avoid books that assume you are starting from scratch because they will be painfully slow to learn from.
I would say that ‘Javascript, the definitive guide’, by David Flanagan is a very good book.
I also like ‘The Javascript Bible’, by Danny Goodman. The first couple of chapters offer a pretty good introductory tutorial and then the rest of it is an excellent reference guide for looking things up as and when you need them.
Reading reviews on Amazon is not very helpful, IMHO. I believe that reading programmer forums is much more efficient. For instance:
What is the best Python book for a beginner?
What did you use to teach yourself Python?
Some Python books can be downloaded for free:
List of Free Online Python Books
Since you’re a physicist, you might want to do numerical stuff. Take a look at these:
Python Scripting for Computational Science
Numerical methods in engineering with Python
I quite like Python. With packages like SciPy and NumPy, I can use Python almost as a MATLAB-replacement. I never programmed in Java, so I have no suggestion about Java books.
Like Matthew mentioned, Java and JavaScript are quite different. In fact, JavaScript was only named that way for marketing purposes, because Java was taking off at the time and the people who developed JS wanted a catchy name for their new language.
I’d put in a plug for Sage (see http://www.sagemath.org/ or see the Wikipedia entry). It uses Python, and gives you SciPy, matplotlib, and much more. You could work online, using the notebook interface in a web browser, or download a virtual machine.
There are only online books on it so far, but I think it has a great future.
Why not get an o’reilly e-book subscription and preview the books till you find one you like. It’s like rent-a-book for programming books.
If you’re learning JavaScript for use on web sites then the problem with most of the books out there is that they teach methods that don’t really match with current views on best practice (unobtrusive and progressive are buzz-words to look for in best-practice).
‘Javascript, the definitive guide’, by David Flanagan is a good reference book, but NOT a good book to learn JavaScript the “Right” way. I would suggest “DOM Scripting: Web Design with JavaScript and the Document Object Model” by Jeremy Keith instead. You might also want to consider the various SitePoint books as well, most of which focus quite strongly on best practices and a modern approach.
Another thing is to consider a book focussing on one of the JavaScript libraries like JQuery or Prototype, as these can help speed up development of scripts considerably once learned.
My first choice for programming books are those from O’Reilly publishing house. They really know what they are doing and produce high quality books with the real experts as authors.
As others have mentioned: Beyond the name, there is not much relation between Java and JavaScript. The first is a C (minus pointers) like object oriented programming language with a virtual machine as target that aims (not always successfully) at machine independence. JavaScript is something that you embed in the html of a webpage and that runs on the user’s browser.
Python is an object oriented scripting language. Those are really three completely different things and it depends very much on the problem you intend to use which is the best tool.
Let me add as a personal remark (which you might not want to hear) that in my taste Perl far more useful than Python with a similar group of problems to approach. It is just much more fun to use (I mean this: I had not been programming since highschool until I discovered Perl and these days I use it for nearly everyting). When given the choice I would always prefere it over Python. The only reason for me to look at Python is because somebody else has used it and I want to change something in their program.
The one thing to really stay away from is PHP. This sucks so much and is the language of choice for people who learned Basic at some point in their life and now want to make their web page dynamic.
Perl and Python (and Java for those matters) have a life outside the web and can be used to get a million other (everyday or much more complex) jobs done.
To get an idea about Perl grab “Learning Perl” by Schwartz (of course published by O’Reilley) and spend a weekend with it. You will love it!
http://docs.python.org/3.0/index.html
i was reasonably pleased with the material available for free online from python’s site, which you can access with the link above.
I’ve been using Python for many a year now, and some time ago I started employing SciPy for various scientifickal jobs, but I’ve always made do with the online resources I could find. In six years, I haven’t bought a single Python book; either the online documentation is adequate, or I’m a cheapskate (well, those might not be mutually exclusive options).
Hi everyone:
These have all been very valuable comments. Thank you all for the great input. It gives me a much better idea of what is out there and which books to buy.
Python is a great language for everything except heavy duty number crunching. SciPy can help out there to some extent. As mentioned above the O’Reilly books are very good. I would also recommend Python Essential Reference by David M. Beazley.
Python’s a very easy language to learn. When I started out, I simply used the documentation on the Python wiki:
http://wiki.python.org/moin/BeginnersGuide/Programmers
Quickly perusing through some of these basic guides will give you more than just a feel of the language. Plus, it takes maybe three or four hours.
It’s like Matlab: it is quite logical and easy to scale once you get your first foothold. But after a certain stage, your depth will depend on what exactly you want to do since there are plenty of things that you could do, that you can’t possibly master completely in the short term. And there’s plenty of documentation in the python wiki.
There’s also this link for later use:
http://www.freebookcentre.net/Language/Free-Python-Books-Download.html
Most of the links there are quite legal, I think.
I’m quite late to the party, but here’s how I went about learning Python (and I’m still in the process of doing that):
For absolute beginners: A Byte of Python – contains one tutorial for 2.x and another for 3.0. If you are already familiar with some other programming language like C/C++, you could finish it in a couple of days.
After that: Dive into Python A little more advanced.
Beyond that, it’s all googling and going through Python’s documentation.
I really love this one. Python is a great language for PowerBall everything except heavy duty number crunching.